|
Basic instructions
In each domain there are a fixed number of basic instructions you may use
to write a program. You're only allowed to use this instructions directly when
writing the script. For our robot the following basic instructions exist:

| Move |
andarFrente(n) |
Move n steps forward |
andarTrás(n) |
Move n steps backward |
virarEsquerda() |
Turn left over 90 degrees |
virarDireita() |
Turn right over 90 degrees |
andarNorte(n) |
Turn to head north and move n steps forward |
andarSul(n) |
Turn to head south and move n steps forward |
andarLeste(n) |
Turn to head east and move n steps forward |
andarOeste(n) |
Turn to head west and move n steps forward |
|
| Paint |
pintarBranco() |
Put the brush with white paint to the ground. |
pintarPreto() |
Put the brush with black paint to the ground. |
pararPintar() |
Stop painting, hide the brush |
|
| Grab |
pegar() |
Get the beacon in front of the robot |
soltar() |
Put a beacon in front of the robot |
|
| Flip coin |
sortear() |
Flip a coin to make a random choice. sortear() will either be true or false. |
|
| See |
Left |
Front |
Right |
|
temObstáculoEsquerda()
vazioEsquerda()
temObjetoEsquerda()
brancoEsquerda()
pretoEsquerda() |
temObstáculoFrente()
vazioFrente()
temObjetoFrente()
brancoFrente()
pretoFrente() |
temObstáculoDireita()
vazioDireita()
temObjetoDireita()
brancoDireita()
pretoDireita() |
|