Exercises

Remember that, when tweaking one particular game mode, it saves time to have the Pop program start up in the game mode that you want to play with. The way to control this is to edit the CPopDoc constructor in popdoc.cpp. Do it now, it’ll save you a lot of clicking later on.

Exercise 14.1: Put the sprites into the UML

Go ahead and complicate the Spacewar UML diagram (Figure 14.1) by adding in the sprite classes used by the various critters. This would include the cPolygon, cPolyPolygon, and cSpriteIcon classes. Can you find a way to do it without having any pairs of crossing lines? If not, then show these classes in a separate UML diagram. Are there any other important classes peculiar to the Spacewar game that we’re leaving out?

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.