Choose Your Own Adventure!

I Program your first game!

i. Confirm 1/7

confirm("I am ready to play!")

ii. Old enough to play? 2/7

confirm("I am ready to play!")
var age = prompt("What's your age");
if (age < 13)
{
    console.log("You are allowed to play but we don't take any responsibility.")
}
else
{
    console.log("Play on!")
}

iii. Adding some story 3/7

confirm("I am ready to play!")
var age = prompt("What's your age");
if (age < 13)
{
    console.log("You are allowed to play but we don't take any responsibility.")
}
else
{
    console.log("Play on!")
}

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")

iv. First move! 4/7

confirm("I am ready to play!");
var age = prompt("What's your age");
if (age < 13)
{
    console.log("You are allowed to play but we don't take any responsibility.");
}
else
{
    console.log("Play on!");
}

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");

v. The story heats up! 5/7

confirm("I am ready to play!");
var age = prompt("What's your age");
if (age < 13)
{
    console.log("You are allowed to play but we don't take any responsibility.");
}
else
{
    console.log("Play on!");
}

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");
if (userAnswer == "yes")
{
    console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
}
else
{
    console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}

vi. Asking for feedback 6/7

confirm("I am ready to play!");
var age = prompt("What's your age");
if (age  8)
{
    console.log("Thank you! We should race at the next concert!");
}
else
{
    console.log("I'll keep practicing coding and racing.");
}

vii. Next steps! 7/7
Save and Submit!

Advertisements

2 thoughts on “Choose Your Own Adventure!

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