Difference between revisions of "Section D 2019"
(→Improvements) |
(→Improvements) |
||
Line 4: | Line 4: | ||
[[Create a method to dump the data to the screen]] | [[Create a method to dump the data to the screen]] | ||
− | [[ | + | [[Count the number of player instructions]] |
− | [[ | + | [[Limit the number of items that can be held in the inventory]] |
[[Implement a way to display your inventory]] | [[Implement a way to display your inventory]] | ||
Line 15: | Line 15: | ||
[[Add a Drop command to drop an item in the inventory]] | [[Add a Drop command to drop an item in the inventory]] | ||
+ | |||
+ | [[Adapt the Use method to switch the torch on and off]] | ||
[[Add the code to use an item as a weapon(truncheon has status of weapon)]] | [[Add the code to use an item as a weapon(truncheon has status of weapon)]] | ||
Line 24: | Line 26: | ||
[[Add a command to Save to a new gme file]] | [[Add a command to Save to a new gme file]] | ||
− | [[ | + | [[Improve change item status method, you can replace but not remove just a single word from the status]] |
Revision as of 14:29, 18 December 2018
Section D of your Unit 1 exam will focus on the skeleton program and improvements to it. The question will specify which part of the program is to be used, and what you need to change. I will create a list of potential improvements, and over time we code each one and document it.
Improvements
Create a method to dump the data to the screen
Count the number of player instructions
Limit the number of items that can be held in the inventory
Implement a way to display your inventory
Add a Help command to display a list of possible commands
Add to the examine method the ability to examine the room, ie to repeat the description and items
Add a Drop command to drop an item in the inventory
Adapt the Use method to switch the torch on and off
Add the code to use an item as a weapon(truncheon has status of weapon)
Add a command to Eat (you start with an apple in the items)
Add a command to Drink (you start with a flask in the items)
Add a command to Save to a new gme file
Improve change item status method, you can replace but not remove just a single word from the status