< Previous | Contents | Next >

Introducing the Critter Caretaker Game

The Critter Caretaker game puts the player in charge of his own virtual pet. The player is completely responsible for keeping the critter happy, which is no small task. He can feed and play with the critter to keep it in a good mood. He can also listen to the critter to learn how the critter is feeling, which can range from happy to mad. Figure 8.5 shows off the game.



image

Figure 8.5

If you fail to feed or entertain your critter, it will have a mood change for the worse. (But don’t worry— with the proper care, your critter can return to a sunny mood.)

Introducing the Critter Caretaker Game 275


You can download the code for this program from the Course Technology website (www.courseptr.com/downloads). The program is in the Chapter 8 folder; the filename is critter_caretaker.cpp.


 

Planning the GamePlanning the PseudocodeThe Critter ClassThe main() Function