Keeping Score

Here is a third look at our stupidly simple walking-jumping-ducking game. This time, you can score. Reaching either end of the screen will add points. Getting hit with the cannonball costs points. Let your score go below zero, and it's all over.

This project handles score through a document class. Technically, we could have used any class of which there is only one instance -- in this case, either the cannonball or the sprite. In most cases, though, you should handle central functions like scorekeeping in your document class (that is, at the root).

See the Code Resources page for source files, listed under 10-12-09.




University of Baltimore Logo

Last updated: 10/05/09 14:59:25
Copyright © 2009 School of Information Arts and Technologies