|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.TeamHEC.LocomotionCommotion.Game.CoreGame
public class CoreGame
Constructor Summary | |
---|---|
CoreGame(java.lang.String Player1Name,
java.lang.String Player2Name,
Station Player1StationStart,
Station Player2StationStart,
int turnLimit)
Initialises a Game object. |
Method Summary | |
---|---|
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()
Gets the world map |
Player |
getPlayer1()
Gets player one |
Player |
getPlayer2()
Gets player two |
Player |
getPlayerTurn()
Gets the player who's turn it is |
int |
getTurnCount()
Gets the current turn count |
int |
getTurnLimit()
Gets the turn limit for the game |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
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).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |