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 [/!]getQuantidadeDeBases() [!scala]:Int[/!]Returns the amount of bases on this field.
[!java|c]int [/!]getQuantidadeDePosições() [!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 [/!]getPosiçãoDoBuraco() [!scala]:Int[/!]Returns the hole position within its base
[!java|c]int [/!]getCorDoJogador([!java|c]int [/!]base[!scala]:Int[/!], [!java|c]int [/!]posição[!scala]:Int[/!]) [!scala]:Int[/!]Returns the color of the player at a given location.
[!java]boolean [/!][!c]int [/!]estáOrdenado() [!scala]:Boolean[/!]Returns whether all players of the field are at home.
[!java]boolean [/!][!c]int [/!]baseEstáOrdenada([!java|c]int [/!]base) [!scala]:Boolean[/!]Returns whether all players of a given base are at home.
[!java]boolean [/!][!c]int [/!]estáSelecionado() [!scala]:Boolean[/!]Returns whether the current world is selected in the interface.
[!java|c]void [/!]mover([!java|c]int [/!]base[!scala]:Int[/!], [!java|c]int [/!]posição[!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).