Class Game
java.lang.Object
Game
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
checkFieldClear
(int posToCheck, Player p, Game g) boolean
figureIsUsable
(int dice, int figId, Player p, Game g) getUsableFigures
(int dice, Player p, Game g) static void
int
-
Constructor Details
-
Game
public Game()
-
-
Method Details
-
main
- Throws:
InterruptedException
-
checkDice
- Parameters:
dice
- Value of dice got from rolldice()p
- active PlayercountRolls
- Counter how often the Player already rolled the dice- Returns:
- true if Player can roll the dice another time
-
checkFieldClear
- Parameters:
posToCheck
- Target position to checkp
- active Playerg
- game instance- Returns:
- 2 - own Player 1 - another Player 0 - Field clear
-
getUsableFigures
- Parameters:
dice
- Value of dice got from rolldice()p
- active Playerg
- game instance- Returns:
- List of int with figIds the Player can choose from
-
figureIsUsable
- Parameters:
dice
- Value of dice got from rolldice()figId
- id of figure to checkp
- active Playerg
- game instance- Returns:
- true if figure is usable
-
setFigure
- Parameters:
figId
- id of figure to checkdice
- Value of dice got from rolldice()p
- active Playerg
- game instance- Returns:
- 0 if no figure kicked. 1 if another figure was kicked
-