public class CoreGame
extends java.lang.Object
Constructor and Description |
---|
CoreGame(java.lang.String Player1Name,
java.lang.String Player2Name,
Station Player1StationStart,
Station Player2StationStart,
int turnLimit)
Initialises a Game object.
|
Modifier and Type | Method and Description |
---|---|
void |
EndTurn()
Ends the turn of a player.
|
java.util.HashMap<java.lang.String,Resource> |
getBaseResources(Station station)
Generates the resources a player will start with based on their start
location
|
WorldMap |
getGameMap() |
Player |
getPlayer1() |
Player |
getPlayer2() |
Player |
getPlayerTurn() |
int |
getTurnCount() |
int |
getTurnLimit() |
void |
saveGameJSON(java.lang.String gameName)
Saves the game to a .json file in the user's home directory in a folder called LocomotionCommotion.
|
void |
StartTurn()
Starts a players turn.
|
public CoreGame(java.lang.String Player1Name, java.lang.String Player2Name, Station Player1StationStart, Station Player2StationStart, int turnLimit)
Player1Name
- The name of Player1Player2Name
- The name of Player2Player1StationStart
- Player1 should have selected a station to buy at the beginning
of the game. This is their selected Station's object.Player2StationStart
- Player2 should have selected a station to buy at the beginning
of the game. This is their selected Station's object.turnLimit
- The number of turns before the end of the game.public void EndTurn()
public void StartTurn()
public java.util.HashMap<java.lang.String,Resource> getBaseResources(Station station)
station
- A player's starting location.public WorldMap getGameMap()
public Player getPlayer1()
public Player getPlayer2()
public int getTurnCount()
public int getTurnLimit()
public Player getPlayerTurn()
public void saveGameJSON(java.lang.String gameName)
gameName
- The name of the .json file the game is saved to. (No extension).