< Previous | Contents | Next >
The rest of the program will be pretty simple. It’ll 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. Here’s 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