Class Game


  • public class Game
    extends Object
    Holds data in the database for the current game to use.
    • Constructor Detail

      • Game

        public Game()
    • Method Detail

      • getId

        public long getId()
        Returns the auto-generated id for the scale.
        Returns:
      • setId

        public void setId​(long id)
        Sets the auto-generated id for the scale.
        Parameters:
        id - The id for the scale.
      • getUserId

        public long getUserId()
        Returns the user id of the game.
        Returns:
      • setUserId

        public void setUserId​(long userId)
        Sets the user id of the game.
        Parameters:
        userId - The user id of the game.
      • getPlayerDeckId

        public long getPlayerDeckId()
        Returns the player's deck id of the game.
        Returns:
      • setPlayerDeckId

        public void setPlayerDeckId​(long playerDeckId)
        Sets the player's deck id of the game.
        Parameters:
        playerDeckId - The player's deck id of the game.
      • getComputerDeckId

        public long getComputerDeckId()
        Returns the computer's deck id of the game.
        Returns:
      • setComputerDeckId

        public void setComputerDeckId​(long computerDeckId)
        Sets the computer's deck id of the game.
        Parameters:
        computerDeckId - The computer's deck id of the game.
      • isPlayerUnitsAlive

        public boolean isPlayerUnitsAlive()
        Returns a boolean that sees if the player's units are still alive in the game.
        Returns:
      • setPlayerUnitsAlive

        public void setPlayerUnitsAlive​(boolean playerUnitsAlive)
        Sets the boolean sees if the player's units are still alive in the game.
        Parameters:
        playerUnitsAlive - The players units if their alive or not.
      • isComputerUnitsAlive

        public boolean isComputerUnitsAlive()
        Returns a boolean that sees if the computer's units are still alive in the game.
        Returns:
      • setComputerUnitsAlive

        public void setComputerUnitsAlive​(boolean computerUnitsAlive)
        Sets the boolean sees if the computer's units are still alive in the game.
        Parameters:
        computerUnitsAlive - The players units if their alive or not.
      • getPlayerCriticalChance

        public int getPlayerCriticalChance()
        Returns the current critical chance that the player has for the turn.
        Returns:
      • setPlayerCriticalChance

        public void setPlayerCriticalChance​(int playerCriticalChance)
        Sets the current critical chance that the player has for the turn.
        Parameters:
        playerCriticalChance - The player's critical hit chance.
      • getComputerCriticalChance

        public int getComputerCriticalChance()
        Returns the current critical chance that the computer has for the turn.
        Returns:
      • setComputerCriticalChance

        public void setComputerCriticalChance​(int computerCriticalChance)
        Sets the current critical chance that the computer has for the turn.
        Parameters:
        computerCriticalChance - The computer's critical hit chance.