0
Adventure 2
source link: http://programmingbydoing.com/a/adventure2.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Adventure 2
- Author: Graham Mitchell
- Filename: Adventure2.java
Adventure 2
Make another short "Choose Your Own Adventure" game. However, this time you need to use a loop so that they can freely move from room to room and back again.
There need to be at least six rooms or destinations, and at least two different ways for the game to end.
Files Needed
MITCHELL'S TINY ADVENTURE 2! You are in a creepy house! Would you like to go "upstairs" or into the "kitchen"? > kitchen There is a long countertop with dirty dishes everywhere. Off to one side there is, as you'd expect, a refrigerator. You may open the "refrigerator" or go "back". > back You are in a creepy house! Would you like to go "upstairs" or into the "kitchen"? > upstairs Upstairs you see a hallway. At the end of the hallway is the master "bedroom". There is also a "bathroom" off the hallway. Or, you can go back "downstairs". Where would you like to go? > downstairs You are in a creepy house! Would you like to go "upstairs" or into the "kitchen"? > kitchen There is a long countertop with dirty dishes everywhere. Off to one side there is, as you'd expect, a refrigerator. You may open the "refrigerator" or go "back". > refrigerator Inside the refrigerator you see food and stuff. It looks pretty nasty. Would you like to eat some of the food? ("yes" or "no") > yes The food is slimy and foul, but you manage to choke it down. Your stomach starts jumping like a frog in hot water. You feel faint. Sliding to the floor, the darkness closes in. You have died.
©2013 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK