< Previous | Contents | Next >

Planning the Pseudocode

The rest of the program will be pretty simple. Itll basically be a game loop that asks the player whether he wants to listen to, feed, or play with the critter, or quit the game. Heres the pseudocode I came up with:

Create a critter

While the player doesn’t want to quit the game Present a menu of choices to the player

If the player wants to listen to the critter Make the critter talk

If the player wants to feed the critter Make the critter eat

If the player wants to play with the critter Make the critter play

Introducing the Critter Caretaker Game 277