Coding in JAVA!

//Check if the user is ready to play!
var age = prompt(“What’s Your Age??”);

if (age<18)
{
console.log(“You can play, but kiddo no mommy-mommy!”);
}

else
{
console.log(“Go On! Do IT!”);
}
var userAnswer = prompt(“You Feeling Lucky?”)
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.”);
if (userAnswer===”yes”)
{
console.log(“Batman hits you very hard. It’s Batman and you’re you! Of course Batman wins!”)
}
else
{
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(“Rate my game out of 10!”);
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!”);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s