Skip to content

Instantly share code, notes, and snippets.

@retpolanne
Created January 4, 2019 00:27
Show Gist options
  • Select an option

  • Save retpolanne/81aad2a5aab62a16bd4ec095c844aa76 to your computer and use it in GitHub Desktop.

Select an option

Save retpolanne/81aad2a5aab62a16bd4ec095c844aa76 to your computer and use it in GitHub Desktop.
Wow.... I found the first code I've written, back in 2012, thanks to Codecademy.
var confirm1;
confirm1 = confirm("Are you ready to play?");
if(confirm1===true){
var age = prompt("how old are you?");
if (age < 18){
console.log("you are not old enough to play");
}
else{
console.log("You may start your quest!");
}
}
else if(confirm1===false){
prompt("Ok, bye...");
}
if ((confirm1===true)&(age>=18)){
console.log("Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him.");
console.log("Batman glares at you.");
var userAnswer=prompt(console.log("Batman: Are you feeling lucky, punk?"));
console.log("You:",userAnswer);
if(userAnswer===("Yes")){
console.log("Batman hits you very hard. It's Batman and you're you! Of course Batman wins!");
var lose, max_score_value,choice,score;
max_score_value=100;
lose=5;
score=max_score_value-lose;
choice = prompt(console.log("What will you do? A=Kick Him!; B=Go out"));
if(choice===("A")){
console.log("Snow White takes her winchester 22 and call her little friends: the seven pixies!");
var snow;
snow = prompt(console.log("What will you do now? A=Call Chuck Norris; B=Get Killed"));
if(snow===("A")){
console.log("You'll gain 5 in your score");
console.log("Your score:",score=score+5);
snow = prompt(console.log("What will you do now? A=Call Maria L˙cia;B=Kill Yourself"));
if(snow===("A")){
console.log("Maria L˙cia steals Snow White's winchester 22 then kills Snow White and Batman");
console.log("You won the battle");
}
else if(snow===("B")){
console.log("You killed yourself. Batman and Snow White get married. Maria L˙cia gets married with Jeremias Maconheiro. Both lived happy forever");
}
}
else if (snow===("B")){
console.log("You got killed. Batman and Snow White get married. Maria L˙cia gets married with Jeremias Maconheiro. Both lived happy forever.");
}
}
else if (choice===("B")){
console.log("You gave up the battle. Your score is:",score);
}
}
else if(userAnswer===("No")){
console.log("You did not say yes to feeling lucky. Good choice! You are a winner in the game of not getting beaten up by Batman.");
}
}
var feedback=prompt("Please, rate my game");
if(feedback>8){
console.log("This is just the beginning of my game empire. Stay tuned for more!");
}
else{
console.log("I slaved away at this game and you gave me that score?! The nerve! Just you wait!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment