|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.controls.AbstractAnimation
org.opensourcephysics.controls.AbstractSimulation
org.opensourcephysics.sip.ch14.ca.LifeApp
public class LifeApp
LifeApp implements the "Game of Life" invented by John Conway and popularized by Martin Gardner in his Mathemtatical Recreations column in Scientific American. (October 1970)
| Field Summary |
|---|
| Fields inherited from class org.opensourcephysics.controls.AbstractSimulation |
|---|
control, showStepsPerDisplay, stepCounter, stepsPerDisplay |
| Fields inherited from class org.opensourcephysics.controls.AbstractAnimation |
|---|
animationThread, decimalFormat, delayTime, mainFrame |
| Constructor Summary | |
|---|---|
LifeApp()
Constructs the LifeApp. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears all cells. |
void |
doStep()
Step the Lattice by one generation. |
void |
initCells(int size)
Initialzie the game of life. |
void |
initialize()
Set the default parameters in the control. |
static void |
main(java.lang.String[] args)
|
void |
reset()
Sets the default parameters in the control. |
| Methods inherited from class org.opensourcephysics.controls.AbstractSimulation |
|---|
enableStepsPerDisplay, getControl, getLoader, getStepCounter, getStepsPerDisplay, initializeAnimation, resetAnimation, run, setControl, setStepsPerDisplay, start, startAnimation, startRunning, startSimulation, stepAnimation, stop, stopAnimation, stopRunning, stopSimulation |
| Methods inherited from class org.opensourcephysics.controls.AbstractAnimation |
|---|
addChildFrame, clearChildFrames, getChildFrames, getDelayTime, getMainFrame, getOSPApp, isRunning, setDelayTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensourcephysics.controls.Simulation |
|---|
isRunning |
| Constructor Detail |
|---|
public LifeApp()
| Method Detail |
|---|
public void initCells(int size)
public void clear()
public void reset()
reset in class AbstractSimulationpublic void initialize()
initialize in class AbstractSimulationpublic void doStep()
doStep in class AbstractAnimationpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||