public abstract class GameModel
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
GameModel(java.lang.String name,
int size)
Creates a new instance with the given name and size.
|
Modifier and Type | Method and Description |
---|---|
abstract double |
get(int x,
int y)
Returns the value of the cell at the given coordinates.
|
java.lang.String |
getName()
Returns the name of the game.
|
abstract boolean |
set(int x,
int y,
double value)
Sets the value of the cell at the given coordinates.
|
int |
size()
Returns the size of the board.
|
protected GameModel(java.lang.String name, int size)
name
- the name of the game.size
- the size of the board.public int size()
public java.lang.String getName()
public abstract double get(int x, int y)
x
- the x coordinatey
- the y coordinatepublic abstract boolean set(int x, int y, double value)
x
- the x coordinatey
- the y coordinatevalue
- the value set