Last active
December 23, 2015 16:39
-
-
Save varjmes/6663457 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check if the player is ready to play! | |
confirm("Are you ready to begin?"); | |
// How old is the player? | |
var age = prompt("How old are you?"); | |
if (age < 18) { | |
console.log("Fine, you can play, but I'm not responsible for you."); | |
} else { | |
console.log("Let's go!"); | |
} | |
// The thought-provoking, award winning, fantastical plot. | |
// No applause necessary. | |
console.log("You're walking down the road, minding your own business when you're approached by an elderly woman."); | |
console.log("\"Help me!\" she says."); | |
var userAnswer = prompt("Do you want to help this elderly woman?"); | |
if (userAnswer.toLowerCase() === "yes") { | |
console.log("You approach her. She hits you in the face with her bag. You die."); | |
} else if (userAnswer.toLowerCase() === "no") { | |
console.log("You walk away from her. She catches up to you and hits you in the face with her bag. You die."); | |
} else { | |
console.log("Useless Error notification, indicating you messed the game up. Congratumalations. You die."); | |
} | |
// Rate my game pls | |
var feedback = prompt("On a scale from 1-10, how good was this game?"); | |
if (feedback > 8) { | |
console.log("Too right."); | |
} else { | |
console.log("I hit you in the face with my bag. You die."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to @benhowdle89 for the help with the .toLowerCase() function :)