Sun Microsystems J2ME Tool Storage User Manual


 
Appendix A Application Demonstrations 85
FIGURE 44 The Game of Life in three dimensions
The keypad buttons provide control over the game.
This source code for this example is particularly well-documented. Take a look at
{toolkit}\apps\Demo3D\src\com\superscape\m3g\wtksamples\life3d\Lif
e3D.java.
A.4.2 PogoRoo
PogoRoo shows you the rear end of a kangaroo bouncing up and down on a pogo
stick.
TABLE 9 Controls for Life3D
Button Description
0 Pause the animation
1 Resume the animation at its default speed
2 Speed up the animation
3 Slow down the animation
4 Choose the previous preset configuration from a list that includes
gems like P4 Glider, Skew beehive plus, and P4 Rotor.
5 Choose the next preset configuration from the list.
* Generate a random configuration and animate until it stabilizes or
dies. If it dies, generate a new random configuration.