public class Replay
extends java.lang.Object
| Constructor and Description |
|---|
Replay(int turnCount,
int playerCount)
creates an instance of the replay class, this handles the Replay functionality within the game.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFault(Station station) |
void |
addLock(MapObj obj) |
void |
addNewTurn()
TODO implement save game
|
void |
endTurn(Player[] listOfPlayers)
called at the end of each turn to add the current turn to the list of turns
|
void |
newTurn(int turnCount,
int playerCount)
called at the start of a new turn, initialises a new turn objects
|
void |
removeFault(Station station)
called when a station is fixed to remove it from the list of faulty stations
|
void |
removeLock(MapObj obj)
called when a station is fixed to remove it from the list of locked stations
|
void |
saveGame()
Saves the game either when the user hits save, or automatically at the end of a game.
|
public Replay(int turnCount,
int playerCount)
turnCount - playerCount - public void newTurn(int turnCount,
int playerCount)
turnCount - playerCount - public void addFault(Station station)
a - faulty station
adds a station to the faulty station array if it not already presentpublic void addLock(MapObj obj)
a - locked station
adds a station to the locked station array if it not already presentpublic void removeFault(Station station)
fixedStation - public void removeLock(MapObj obj)
unlockedStation - public void endTurn(Player[] listOfPlayers)
listOfPlayers - public void addNewTurn()
public void saveGame()