Package net.royalur.model.path
Class PathPair
java.lang.Object
net.royalur.model.path.PathPair
- Direct Known Subclasses:
AsebPathPair
,BellPathPair
,MastersPathPair
,MurrayPathPair
,SkiriukPathPair
Represents a pair of paths for the light and dark players to
move their pieces along in a game of the Royal Game of Ur.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
get
(PlayerType player) Gets the path ofplayer
, excluding the start and end tiles that exist off the board.getDark()
Gets the path that the dark player's pieces must take, excluding the start and end tiles that exist off the board.Gets the end tile for the dark player that exists off the board.Gets the start tile for the dark player that exists off the board.Gets the path that the dark player's pieces must take, including the start and end tiles that exist off the board.getEnd
(PlayerType player) Gets the end tile ofplayer
that exists off the board.getID()
Gets the ID of this path pair.getLight()
Gets the path that the light player's pieces must take, excluding the start and end tiles that exist off the board.Gets the end tile for the light player that exists off the board.Gets the start tile for the light player that exists off the board.Gets the path that the light player's pieces must take, including the start and end tiles that exist off the board.getName()
Gets the name of this path.Gets the type of this path.getStart
(PlayerType player) Gets the start tile ofplayer
, which exists off the board.getWithStartEnd
(PlayerType player) Gets the path ofplayer
, including the start and end tiles that exist off the board.boolean
Gets whether this path has an associated path type.boolean
isEquivalent
(PathPair other) Determines whether the paths that the light player's pieces must take, and the paths that the dark player's pieces must take, are equivalent between this path pair andother
.
-
Constructor Details
-
PathPair
Instantiates a pair of paths.- Parameters:
id
- The ID of this path.lightWithStartEnd
- The path that light players take around the board, including the start and end tiles that exist off the board.darkWithStartEnd
- The path that dark players take around the board, including the start and end tiles that exist off the board.
-
-
Method Details
-
getID
Gets the ID of this path pair.- Returns:
- The ID of this path pair.
-
hasPathType
public boolean hasPathType()Gets whether this path has an associated path type. Custom path may not have an associated path type.- Returns:
- Whether this path has an associated path type.
-
getPathType
Gets the type of this path.- Returns:
- The type of this path.
-
getName
Gets the name of this path.- Returns:
- The name of this path.
-
getLight
Gets the path that the light player's pieces must take, excluding the start and end tiles that exist off the board.- Returns:
- The path that the light player's pieces must take on the board.
-
getDark
Gets the path that the dark player's pieces must take, excluding the start and end tiles that exist off the board.- Returns:
- The path that the dark player's pieces must take on the board.
-
get
Gets the path ofplayer
, excluding the start and end tiles that exist off the board.- Parameters:
player
- The player to get the path for.- Returns:
- The path for the given player.
-
getLightWithStartEnd
Gets the path that the light player's pieces must take, including the start and end tiles that exist off the board.- Returns:
- The path that the light player's pieces must take on and off the board.
-
getDarkWithStartEnd
Gets the path that the dark player's pieces must take, including the start and end tiles that exist off the board.- Returns:
- The path that the dark player's pieces must take on and off the board.
-
getWithStartEnd
Gets the path ofplayer
, including the start and end tiles that exist off the board.- Parameters:
player
- The player to get the path for.- Returns:
- The path for the given player.
-
getLightStart
Gets the start tile for the light player that exists off the board.- Returns:
- The start tile for the light player.
-
getDarkStart
Gets the start tile for the dark player that exists off the board.- Returns:
- The start tile for the dark player.
-
getStart
Gets the start tile ofplayer
, which exists off the board.- Parameters:
player
- The player to get the start tile for.- Returns:
- The start tile of the given player.
-
getLightEnd
Gets the end tile for the light player that exists off the board.- Returns:
- The end tile for the light player.
-
getDarkEnd
Gets the end tile for the dark player that exists off the board.- Returns:
- The end tile for the dark player.
-
getEnd
Gets the end tile ofplayer
that exists off the board.- Parameters:
player
- The player to get the end tile for.- Returns:
- The end tile of the given player.
-
isEquivalent
Determines whether the paths that the light player's pieces must take, and the paths that the dark player's pieces must take, are equivalent between this path pair andother
. The start and end tiles that exist off the board may still differ between the paths.- Parameters:
other
- The other pair of paths to check for equivalency.- Returns:
- Whether the paths that the light and dark player's pieces must take
around the board are equivalent for this path pair and
other
.
-
equals
-