dimanche 6 novembre 2016

I want to make a text adventure

Hello I want to make a text adventure game in javascript with only using prompt, alert and if statements. how could i best go about this to get a good working game? This is what i have so far but it seems not to work

var answer = prompt("someone stands in front of you what will you say?    A: im gonna kill you B: how are you?");

if (answer == a) {
  alert("You died");
}
if (answer == b) {
var answer = prompt("I am oke but i could use your help will you help  me?");
}

Aucun commentaire:

Enregistrer un commentaire