Package dev.davwheat
Class Game
- java.lang.Object
-
- dev.davwheat.Game
-
public class Game extends java.lang.Object
Manages the game state and runs the game itself.
-
-
Field Summary
Fields Modifier and Type Field Description Deck
cardDeck
The full deck of cards used within the game.GameBoard
gameBoardInstance
The GameBoard associated with the current game.
-
Constructor Summary
Constructors Constructor Description Game()
Creates an instance of the `Game` class.
-
Method Summary
Modifier and Type Method Description void
endTurn(Player actor)
End the active player's turn.Player
getActivePlayer()
Gets the player currently taking their turn.java.util.ArrayList<Player>
getPlayers()
Gets the list of all players in the Game.
-
-
-
Method Detail
-
getPlayers
public java.util.ArrayList<Player> getPlayers()
Gets the list of all players in the Game.- Returns:
- List of all players
-
getActivePlayer
public Player getActivePlayer()
Gets the player currently taking their turn.- Returns:
- Player currently taking their turn
-
endTurn
public void endTurn(Player actor) throws javax.naming.NoPermissionException
End the active player's turn.- Parameters:
actor
- The Player class which is calling this method.- Throws:
javax.naming.NoPermissionException
- Actor is not the active player
-
-