Class Player
java.lang.Object
Player
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
checkFigureInBase
(ArrayList<Figure> figures) Checks if the Player has figures in the base (off gameboard)boolean
checkGameWin
(ArrayList<Figure> figures) Checks if a Player has won the game with the current playint
Get the user input on witch figure the user wants to moveint
rollDice()
Rolls the dice - Generates a random Number in the range of 1 - 6
-
Constructor Details
-
Player
-
-
Method Details
-
rollDice
public int rollDice()Rolls the dice - Generates a random Number in the range of 1 - 6- Returns:
- value of the dice
-
checkGameWin
Checks if a Player has won the game with the current play- Parameters:
figures
- figures of the current Player- Returns:
- true if Player has won
-
checkFigureInBase
Checks if the Player has figures in the base (off gameboard)- Parameters:
figures
- figures of the current Player- Returns:
- true if there is at least one figure in the base (off gameboard)
-
choose
Get the user input on witch figure the user wants to move- Parameters:
usableFigures
- list of usable Figures to choose from- Returns:
- int figid of the figure chosen
-