[Tutor] designing POOP

bhaaluu bhaaluu at gmail.com
Wed Feb 6 16:40:38 CET 2008


On Feb 5, 2008 3:02 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> Describe the problem in plain English text(or whatever you
> language is!).
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.freenetpages.co.uk/hp/alan.gauld
>

Here is my description, in plain English.

Text Adventure Game Requirements:
 1. The Explorer enters her name at a prompt.
 2. Other things are initialized at this point.
 3. The layout of the Castle is defined.
 4. Treasure is placed in rooms in the Castle.
    A. Treasure is distributed randomly to four rooms.
    B. Treasure is placed in two specific rooms.
 5. Four Monsters are randomly distributed to four rooms in the Castle.
    A. No monsters should be placed at Entrance or Exit.
    B. Each monster has a name.
    C. Each monster has a Ferocity Factor / Danger Level.
 6. She has 100 strength and $75 wealth to start with.
    A. Strength is decremented 5 for each prompt entry.
       1. If strength equals zero:
          a. She dies.
          b. Final score displayed.
          c. Game over.
    B. Strength can be incremented by consuming food.
    C. Wealth can be used to buy things in QuarterMaster's Store.
    D. Wealth can be incremented by finding and picking-up treasure.
 7. She does not have food, weapons, armor, magic, or light.
 8. She starts at the Entrance to the Castle (Room 6).
 9. She cannot see anything without a light.
10. She enters commands at the prompt in order to:
    A. Move in six directions [N,S,E,W,U,D]:
       1. Move in indicated direction.
       2. Informed she cannot move in indicated direction.
       3. Her strength is decremented 5 each move.
       4. The tally of moves is incremented 1 each move.
    B. Access the Provisions & Inventory menu [I]:
       1. She must have some wealth to access the P&I menu.
       2. She can purchase items from the menu:
          a. Light is 0 or 1.
          b. Weapons: Axe / Sword is 0 or 1.
          c. Food units.
             1. She is told how many units of food she has.
             2. She is asked how many units of food she wants to buy.
          d. Magic amulet.
          e. Armor.
       3. Wealth is decremented after each purchase.
          a. She is informed when she has no money, and exited from the store.
          b. She loses everything except strength and food,
             if she tries to spend more wealth than she has.
    C. She can pick-up treasure [P].
       1. She cannot pick-up treasure if she cannot see it (she needs light).
       2. The treasure will remain in the room if not picked-up.
    D. She can run from a monster [R].
       1. She may be asked where she wants to flee to (direction).
       2. She may be told she must stand and fight (random decision).
    E. She can fight a monster.
       1. Wearing armor increases her chance of success.
       2. If she has a weapon, she must fight with it.
       3. If she has two weapons, she is asked which one she wants to use.
       4. If she has no weapon(s), she must fight bare-handed.
          a. The Explorer or the monster may attack first (random decision).
          b. The Explorer or the monster may wound the other (random decision).
          c. The Explorer or the monster may defeat the other.
             1. Strength is decremented from the Explorer during the fight.
             2. Ferocity Factor is decremented from the monster during
the fight.
11. She can consume food [C].
    A. She must have food to consume
       1. She is told how many units of food she has.
       2. She is asked how many units of food she wants to eat.
12. She can use the Magic Amulet [M].
    A. She must have the Magic Amulet in her possession.
    B. The Magic Amulet will move her to a random room in the Castle.
       1. It should not move her to the Entrance or Exit.
13. The game ends when she exits the Castle (finds Room 11).
    A. Exit message is displayed.
    B. Final Score is displayed.
       1. Final score depends on several factors:
          a. Strength, wealth, tally, food, number of monsters killed.

Now the hard part: grammar.
Happy Programming!
-- 
b h a a l u u at g m a i l dot c o m
"You assist an evil system most effectively by obeying its
orders and decrees. An evil system never deserves such
allegiance.  Allegiance to it means partaking of the evil.
A good person will resist an evil system with his or her
whole soul." [Mahatma Gandhi]


More information about the Tutor mailing list