Advertisement
Le-Ownect

Programado em JavaScript By Ownect!

Jun 19th, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Check if the user is ready to play!
  2. confirm("Você está pronto para jogar?");
  3.  
  4. //Exibir prompt de idade
  5.  
  6. var age = prompt("Qual sua idade?");
  7.  
  8. //Verificação de idade
  9.  
  10. if (18 > age) {
  11.     console.log("Você está liberado para jogar!");
  12. }
  13. else {
  14.     console.log("Você tem mais de 18 anos");
  15. }
  16.  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.");
  17.  
  18.  console.log("Batman olha para você.");
  19.  
  20.  var userAnswer = confirm("Are you feeling lucky, punk?");
  21.  var yes = "userAnswer";
  22.  
  23.  console.log('Batman glares at you.');
  24.  
  25.  if (yes === userAnswer){
  26.       // Do something
  27. console.log("Batman hits you very hard. It's Batman and you're you! Of course Batman wins!");
  28.  }
  29.  else {
  30.       // Otherwise...
  31.     // Do something else!
  32.      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.");
  33.  }
  34.  
  35.  //variavel feedback
  36.  
  37.  var feedback = prompt("Qual nota você daria ao meu jogo?? Criado por mim ownect!");
  38.  //Avaliar resposta do usuario!
  39.  if (feedback > 8) {
  40.      console.log("his is just the beginning of my game empire. Stay tuned for more!");
  41.  }
  42.  else {
  43.      console.log("I slaved away at this game and you gave me that score?! The nerve! Just you wait!");
  44.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement