diff --git a/SCadgame.rb b/SCadgame.rb new file mode 100644 index 0000000..23366a3 --- /dev/null +++ b/SCadgame.rb @@ -0,0 +1,45 @@ +require 'rubygems' +require 'artii' +require 'rubocop' + +num = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] + +print "~~~~~~Choose Your Own Adventure Game~~~~~~".center(80) +print "Welcome. To the world of mystery. Where you get to decide. \n".center(80) +print "Are you ready? Y||N \n".center(60) + +input = gets.chomp +input.downcase! + + +if input == 'y' + +puts "Here we go.\n".center(80) +puts "Please enter your name: \n".center(80) +user_name = gets.chomp +user_name.upcase! +puts "Your name is #{user_name}. Welcome, #{user_name}!!!".center(80) + +elsif input == 'n' + +puts 'Alright. Maybe another time.'.center(80) + +else + +num.each do |n| + +puts "Huh. I did not understand. Please try again. Remember, Y||N #{n} tries remaining.\n".center(80) +input = gets.chomp +input.downcase! + +if n == 1 + print "Time out. Next Time." + +end +end +end + +if input == 'y' + +print "Welcome to awesome time.".center(80) +end \ No newline at end of file diff --git a/SCadgameREADME.md b/SCadgameREADME.md new file mode 100644 index 0000000..7141061 --- /dev/null +++ b/SCadgameREADME.md @@ -0,0 +1,3 @@ +This is an incomplete file. It is missing the main game. It has a simple setup by asking the user if they want to play using 'y' or 'n'. It also askes the user for their name. This code will be optimized as time goes. This is just sample code and a preview of whats to come. Later down the line, classes will be used and different rb files. This ensures more readability. Rules and description will be added. + +![Alt Text](http://sd.keepcalm-o-matic.co.uk/i/keep-calm-and-stay-tuned-25.png) \ No newline at end of file