Class Diagrams for the WormChase Application


Figure 3-2 shows the class diagrams for the WormChase application. The class names and public methods are shown.

Figure 3-2. Class diagrams for the WormChase application


The code for this version of WormChase is in the directory Worm/WormP/.


WormChase is the top-level JFrame, managing the GUI, and processing window events. WormPanel is the game panel holding the threaded animation loop.

The Worm class maintains the data structures and methods for the on-screen worm. The Obstacles class handles the blue boxes. Worm and Obstacles have their own draw( ) method, which is called by WormPanel to render the worm and boxes.



Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net