Class Game
- java.lang.Object
-
- edu.cnm.deepdive.cardcombat.model.entity.Game
-
public class Game extends Object
Holds data in the database for the current game to use.
-
-
Constructor Summary
Constructors Constructor Description Game()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getComputerCriticalChance()
Returns the current critical chance that the computer has for the turn.long
getComputerDeckId()
Returns the computer's deck id of the game.long
getId()
Returns the auto-generated id for the scale.int
getPlayerCriticalChance()
Returns the current critical chance that the player has for the turn.long
getPlayerDeckId()
Returns the player's deck id of the game.long
getUserId()
Returns the user id of the game.boolean
isComputerUnitsAlive()
Returns a boolean that sees if the computer's units are still alive in the game.boolean
isPlayerUnitsAlive()
Returns a boolean that sees if the player's units are still alive in the game.void
setComputerCriticalChance(int computerCriticalChance)
Sets the current critical chance that the computer has for the turn.void
setComputerDeckId(long computerDeckId)
Sets the computer's deck id of the game.void
setComputerUnitsAlive(boolean computerUnitsAlive)
Sets the boolean sees if the computer's units are still alive in the game.void
setId(long id)
Sets the auto-generated id for the scale.void
setPlayerCriticalChance(int playerCriticalChance)
Sets the current critical chance that the player has for the turn.void
setPlayerDeckId(long playerDeckId)
Sets the player's deck id of the game.void
setPlayerUnitsAlive(boolean playerUnitsAlive)
Sets the boolean sees if the player's units are still alive in the game.void
setUserId(long userId)
Sets the user id of the 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.
-
-