Class Game

  • All Implemented Interfaces:
    FlatGame

    @Entity
    public class Game
    extends java.lang.Object
    implements FlatGame
    The game is responsible for the following: creating a new game keeping track of players keep track of stacks determining end of game
    • Constructor Detail

      • Game

        public Game()
    • Method Detail

      • getId

        public java.lang.Long getId()
        Specified by:
        getId in interface FlatGame
      • setCurrentState

        public void setCurrentState​(GameState currentState)
      • getCreated

        public java.util.Date getCreated()
        Specified by:
        getCreated in interface FlatGame
      • getUpdated

        @NonNull
        public java.util.Date getUpdated()
        Specified by:
        getUpdated in interface FlatGame
      • getCurrentPlayer

        public GamePlayer getCurrentPlayer()
      • setCurrentGamePlayer

        public void setCurrentGamePlayer​(GamePlayer currentPlayer)
      • getGamePlayers

        public java.util.List<GamePlayer> getGamePlayers()
      • getTurns

        public java.util.List<Turn> getTurns()
      • getLastTurn

        public Turn getLastTurn()
      • setId

        public void setId​(java.lang.Long id)
      • setCreated

        public void setCreated​(@NonNull
                               java.util.Date created)
      • setUpdated

        public void setUpdated​(@NonNull
                               java.util.Date updated)
      • setGamePlayers

        public void setGamePlayers​(java.util.List<GamePlayer> gamePlayers)
      • setTurns

        public void setTurns​(java.util.List<Turn> turns)
      • isLastPlayAccepted

        public boolean isLastPlayAccepted()
      • setLastPlayAccepted

        public void setLastPlayAccepted​(boolean lastPlayAccepted)
      • getWhoWins

        public java.lang.String getWhoWins()
      • setWhoWins

        public void setWhoWins​(java.lang.String whoWins)