public class Checker extends GameObject
Modifier and Type | Field and Description |
---|---|
boolean |
kinged
If the checker has been kinged and can move backwards.
|
Player |
owner
The player that controls this Checker.
|
int |
x
The x coordinate of the checker.
|
int |
y
The y coordinate of the checker.
|
logs
Modifier and Type | Method and Description |
---|---|
boolean |
isMine()
Returns if the checker is owned by your player or not.
|
Checker |
move(int x,
int y)
Moves the checker from its current location to the given (x, y).
|
log
public boolean kinged
public Player owner
public int x
public int y
public boolean isMine()
public Checker move(int x, int y)
x
- The x coordinate to move to.y
- The y coordinate to move to.© 2020 MST ACM SIG-GAME