The code for Dean Moore’s game of Life

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), not in any “perfect” order. First is a java file, the second html.

The main “driver” program:

Life.java

Life.html

User interface:

UI.java

UI.html

Does calculation to compute a single generation of game. Calls next to do real dirty work:

HandleASingleGeneration.java 

HandleASingleGeneration.html

Does two things, as obvious by name — more efficient to the two put together:

PaintBoardAndComputeNextGeneration.java

PaintBoardAndComputeNextGeneration.html

Board utilities, general things that need done — put all here:

BoardUtilities.java                    

BoardUtilities.html

Obvious by name. Performs initializations:

Initializations.java

Initializations.html

Games rules, general nonsense:

HowGameIsPlayedScreen.java

HowGameIsPlayedScreen.html

Handles buttons:

HandleButtons.java

HandleButtons.html

Handles coordinates of board, mathematical stuff:

ManageBoardCoordinates.java

ManageBoardCoordinates.html

Do we get caught in a repeating pattern? This class handles it:

RepeatPattern.java

RepeatPattern.html

Where on screen are things placed? See next:

ScreenLocations.java

ScreenLocations.html

Instantiates objects:

Objects.java

Objects.html

Paints generation number:

GenerationNumberCanvas.java

GenerationNumberCanvas.html

What happens when game ends:

HandleGamesEnd.java

HandleGamesEnd.html

Handles popup windows:

PopupWindow.java

PopupWindow.html

A thread that “sleeps” a time:

Pause.java

Pause.html

Handles hiding variables:

Vars.java

Vars.html

Numeric constants:

Constants.java

Constants.html

String constants:

Strings.java

Strings.html





© dino 2018