Homework
1
IT 140 Sample Dragon Text Game Output Overview In Projects One and Two, you will be designing and then developing a text-based game with a theme of your choice. This handout shows input and output from the sample Dragon Text Game. This will help give you an understanding of how a text-based game works. In this dragon-themed game, the player is trying to find all the items (book, armor, helmet, sword, shield, and peanut butter sandwich) before running into the villain (the dragon). You can also see a sample execution of this game in the Sample Dragon Text Game Walkthrough, which is located in the Supporting Materials sections of the projects. Sample Output Below is sample output of the program, with the player’s input shown in bold font. You will see examples of the game’s output in response to different commands such as moving between rooms or getting items. You will also see examples of input validation, or how the game responds to invalid commands such as getting an item that is not in the current room, moving in a direction that is not valid, or entering a command in the wrong format. As a reminder, the output here is just a sample. The output for your game does not have to exactly match what is here. Dragon Text Adventure Game Collect 6 items to win the game, or be eaten by the dragon. Move commands: go South, go North, go East, go West Add to Inventory: get 'item name' You are in the Great Hall Inventory : [] --------------------------- Enter your move: go North You are in the Dungeon Inventory : [] You see a Sword --------------------------- Enter your move: get Sword Sword retrieved! You are in the Dungeon Inventory : ['Sword'] --------------------------- Enter your move: get Shield Can’t get Shield! You are in the Dungeon Inventory : ['Sword'] --------------------------- Enter your move:
2
go South You are in the Great Hall Inventory : ['Sword'] --------------------------- Enter your move: go East You are in the Kitchen Inventory : ['Sword'] You see a Sandwich --------------------------- Enter your move: Sandwich Invalid Input! You are in the Kitchen Inventory : ['Sword'] You see a Sandwich --------------------------- Enter your move: get Sandwich Sandwich retrieved! You are in the Kitchen Inventory : ['Sword', 'Sandwich'] --------------------------- Enter your move: go South You can’t go that way! You are in the Kitchen Inventory : ['Sword', 'Sandwich'] --------------------------- Enter your move: go North You are in the Dining Room Inventory : ['Sword', 'Sandwich'] You see a Dragon NOM NOM…GAME OVER! Thanks for playing the game. Hope you enjoyed it.
- IT 140 Sample Dragon Text Game Output
- Overview
- Sample Output