public class Automata extends Object
Automata
.Constructor and Description |
---|
Automata(int height,
int width) |
Modifier and Type | Method and Description |
---|---|
boolean |
get(BigInteger state,
int y,
int x)
Method to get the value of a cell at a specified
(y, x)
coordinate fron the argument state . |
int |
getHeight()
Method to get the height of the board.
|
int |
getWidth()
Method to get the width of the board.
|
BigInteger |
next(BigInteger current)
Given the current
state , calculate the next state . |
@ConstructorProperties(value={"height","width"}) public Automata(int height, int width)
height
- The extent of the y-axis.width
- The extent of the x-axis.public int getHeight()
public int getWidth()
public BigInteger next(BigInteger current)
state
, calculate the next state
.current
- The current state
.state
.public boolean get(BigInteger state, int y, int x)
(y, x)
coordinate fron the argument state
.state
- The Automata
state
.y
- The y
coordinate.x
- The x
coordinate.true
if the (y, x)
coordinate is valid and
if the specified cell is "alive;" false
otherwise.Copyright © 2015–2020 Allen D. Ball. All rights reserved.