General portfolio here.
See this
link for more on the game of Life.
Entire
set of Java classes as a single .zip
file at this
link.
(Open)
source code to my Java applet Life
(game at this
link), probably
not in any “perfect” order:
|
As downloadable .java file: |
As html, with “nicer” formatting: |
What about: |
|
The main “driver” program. |
||
|
User interface. |
||
|
Does calculation to compute a single generation of game. Calls next to do real dirty work. |
||
|
Does two things, as obvious by name — more efficient to the two put together. |
||
|
Board utilities, general things that need done — put all here. |
||
|
Obvious by name. |
||
|
Games rules, general nonsense. |
||
|
Handles buttons. |
||
|
Handles coordinates of board, mathematical stuff. |
||
|
Do we get caught in a repeating pattern? This class handles it. |
||
|
Where on screen are things placed? |
||
|
Instantiates objects. |
||
|
Paints generation number. |
||
|
What happens when game ends. |
||
|
Handles popup windows. |
||
|
A thread that “sleeps” a time. |
||
|
Handles hiding variables |
||
|
Numeric constants. |
||
|
String constants. |