Class Main
java.lang.Object
eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationUserInputTracker
eu.svjatoslav.sixth.e3d.examples.life_demo.Main
- All Implemented Interfaces:
eu.svjatoslav.sixth.e3d.gui.FrameListener,eu.svjatoslav.sixth.e3d.gui.humaninput.KeyboardInputHandler
public class Main
extends eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationUserInputTracker
Main entry point for Conway's Game of Life 3D demo.
Creates a 30x30 cell matrix where cells evolve based on Conway's rules.
The user can interact with cells by clicking to toggle their state.
Key controls:
- Space - Evolve one generation
- Enter - Evolve with history (leaves stars marking previous positions)
- C - Clear the matrix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleankeyPressed(KeyEvent event, eu.svjatoslav.sixth.e3d.gui.ViewPanel viewPanel) Handle keyboard input.static voidEntry point for the Game of Life demo.Methods inherited from class eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationUserInputTracker
focusLost, focusReceived, keyReleased, onFrame
-
Constructor Details
-
Main
public Main()Creates a new Main instance for the Game of Life demo.
-
-
Method Details
-
main
Entry point for the Game of Life demo.- Parameters:
args- command line arguments (ignored)
-
keyPressed
Handle keyboard input.- Specified by:
keyPressedin interfaceeu.svjatoslav.sixth.e3d.gui.humaninput.KeyboardInputHandler- Overrides:
keyPressedin classeu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationUserInputTracker
-