Review questions

A Draw a UML diagram to show the relation between the classes cCritter, cCritterArmed, and cCritterBullet.
B How does the cCritterArmed::update method know when to shoot a bullet, and how does it prevent you from shooting the bullets too close together?
C What steps take place when cCritterArmed::shoot is called?
D Why do we need a cBullet::initialize method in addition to the cBullet constructor?
E How does cBullet::collide make use of the cBullet::isTarget method?
F Why do bullets by default have a higher _collidepriority value than regular critters?
G How does the cCritter::damage method avoid having a critter getting damaged two times in a row by two nearby bullets?
H What causes a cCritterArmedRobot to keep shooting, and what ...

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.