The colors are represented by integers, between 0
and amount of bases -1
.
The hole is represented by the special value -1
.
The color of each base is its rank. So base 1
is of color 1
.
In the graphical interface, the base 0
is the dark blue
one while the base 1
is the fuscia one.
Once every players on the field are in their home base, the hole should be in the last base,
that is of rank getBasesAmount()-1
.
[!java|c]int [/!]getBasesAmount() [!scala]:Int[/!]Returns the amount of bases on this field.
[!java|c]int [/!]getPositionsAmount() [!scala]:Int[/!]Returns the amount of player's positions per base on this field.
[!java|c]int [/!]getHoleBase() [!scala]:Int[/!]Returns the base in which the hole is located.
[!java|c]int [/!]getHolePosition() [!scala]:Int[/!]Returns the hole position within its base
[!java|c]int [/!]getPlayerColor([!java|c]int [/!]base[!scala]:Int[/!], [!java|c]int [/!]position[!scala]:Int[/!]) [!scala]:Int[/!]Returns the color of the player at a given location.
[!java]boolean [/!][!c]int [/!]isSorted() [!scala]:Boolean[/!]Returns whether all players of the field are at home.
[!java]boolean [/!][!c]int [/!]isBaseSorted([!java|c]int [/!]base) [!scala]:Boolean[/!]Returns whether all players of a given base are at home.
[!java]boolean [/!][!c]int [/!]isSelected() [!scala]:Boolean[/!]Returns whether the current world is selected in the interface.
[!java|c]void [/!]move([!java|c]int [/!]base[!scala]:Int[/!], [!java|c]int [/!]position[!scala]:Int[/!])Moves a given player into the hole. This throws an IllegalArgumentException if the specified player is not near the hole (at most one base away).