Package model
Class Game
java.lang.Object
model.Game
- All Implemented Interfaces:
Serializable
Game class implementation for Double Trouble Kingdom, connects different game systems, contains methods for managing the state of game.
- See Also:
-
Constructor Details
-
Game
Constructs a Game with dependency injection of Database and Map.- Parameters:
database
- the Database to be injectedmapReference
- the Map to be injectedp1Name
- the name of Player1p2Name
- the name of Player2
-
Game
Constructs a Game for Editor use.- Parameters:
mapReference
- the Map to be injected
-
Game
Copy Constructor for Game.- Parameters:
game
- the Game to be copied
-
-
Method Details
-
getMapReference
Returns the Map of the Game.- Returns:
- the Map of the Game
-
getMap
Returns the Map of the game.- Returns:
- the Map of the game
-
restartGame
public void restartGame()Start a new Game. -
pauseGame
public void pauseGame()Pause the running Game. -
getGameState
Returns the GameState of the Game.- Returns:
- the GameState of the Game
-
getDatabase
Returns the Database of the Game.- Returns:
- the Database of the Game
-