Computer Science Canada Multiple choice adventure game |
Author: | Carey [ Wed Apr 12, 2006 10:20 am ] |
Post subject: | Multiple choice adventure game |
This is an adventure game. My brother made up the story for it, and I wrote the code. (admittedly a weak story, but hey, he's only 11) Is there a way to get rid of some of the if statements? |
Author: | ZeroPaladn [ Wed Apr 12, 2006 12:12 pm ] |
Post subject: | |
perhaps you can make it beatable, but its a neat start. |
Author: | codemage [ Wed Apr 12, 2006 12:36 pm ] | ||||
Post subject: | |||||
That's a pretty good start! Congrats for the first publication of Metcalfe bros. studios. ![]() A few things that you can quickly to do clean up your code: You can declare and initialize variables on the same line like this:
You also have a procedure that you're using for death. If you used procedures for each of the rooms or situations you can be in, you wouldn't have to deal with your massive embedded loops. Here's pseudocode:
|
Author: | Carey [ Thu Apr 13, 2006 9:45 am ] |
Post subject: | Cheat sheet |
I have made a cheat sheet for the game so you can beat it the easy way. ![]() here it is gamename firstname lastname b a a b a b b a b flute a c b a |
: |