Code: <!DOCTYPE html> <html> <body> <script> confirm("Are you ready to play!") var age = prompt("What's your age") if(age < 13) { confirm("you are allowed to play but i do not take any responsibility") } else { confirm("Good luck on your adventure") } confirm("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'") confirm("Suddenly, Bieber stops and says, 'Who wants to race me?'" ) var userAnswer = prompt("Do you want to race Bieber on stage?") if(userAnswer === "yes") { confirm("You and Bieber start racing. It's neck and neck! You win by a shoelace!") } else { confirm("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'") } var feedback = prompt("Rate the game from 0-10") if(feedback >= 8) { confirm("Thank you! We should race at the next concert") } else { confirm("I'll keep practicing coding and racing.") } </script> </body> </html> Copy that into Tryit Editor v2.2 (delete the stuff that is there from the start) And try out my little game. nothing major but a little fun project i had
Dident find a program i could do that in so i just made it inro an html, edited it to confirm on all the stuff too
If you enter "Yes" instead of "yes" it will go directly to the else. Working on a fix atm (will edit jsfiddle link in here later)
I also fix some other things EDIT: Here it goes: Edit fiddle - JSFiddle It even automatically starts from the beginning if you enter a false value. EDIT2: It now automatically starts at the chapter you entered the false value.
Fancy Well it is my first program i have ever coded so alot needed some improvements, also the game story isent the best but it is what CodeCademy asked me to do so i had to do it that way. Fun thing to fiddle around with for a while tough! And thanks paul for helping me with the code
your welcome I can code quite alot. (LUA PHP, JS (only a bit), Java (only a bit either), Perl, Python) If you are ever in need of anything ask
I will Just noticed that CodeCademy had python too so i might look into that a bit too. Will post some creations here for you and others too look at and improve