public class GameHistory
extends java.lang.Object
It holds all information of one whole game, like score, startCore and all core core changes made throughout the game.
| Constructor and Description |
|---|
GameHistory(int size)
GameHistory
Initializes an empty list of the size of the playing field (core) for the start core.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCoreChange(CoreChange coreChange)
addCoreChange
adds a core change to the core change queue.
|
java.util.Queue<CoreChange> |
getQueue()
getQueue
|
int |
getScore()
getScore
|
java.util.ArrayList<java.lang.Integer> |
getStartCore()
getStartCore
|
protected void |
setQueue(java.util.Queue<CoreChange> queue)
setQueue
|
void |
setScore(int score)
setScore
|
public GameHistory(int size)
Initializes an empty list of the size of the playing field (core) for the start core.
size - - committed size of the playing field (core).protected void setQueue(java.util.Queue<CoreChange> queue)
queue - - committed queue of core changespublic java.util.Queue<CoreChange> getQueue()
public java.util.ArrayList<java.lang.Integer> getStartCore()
protected void addCoreChange(CoreChange coreChange)
adds a core change to the core change queue.
core - change - committed core changepublic int getScore()
public void setScore(int score)
score - - committed outcome (score) of the game