Function | Code | Return Value | Parameters | Effect |
backstep | 0x03 | - | - | move the sheep entity backwards by 1 unit |
blocked | 0x04 | * | 1 | direction | checks if the sheep entity's path is blocked in the given direction (relative to the its current alignment) valid parameter values are: front - 1.0 right - 2.0 back - 3.0 left - 4.0 returns 1.0 if the path is blocked or 0.0 if the path is free |
initialise | 0x0F | - | 2 | x coord, y coord | set the position of the sheep entity on the "The Meadow" to the positions given by the x and y parameters (should only be invoked once at the start of the program). |
random | 0x1D | * | - | returns a random number (note: the instruction data value must be set to 1.0 for this intrinsic function) |
step | 0x20 | - | - | move the sheep entity forward by 1 unit |
turn left | 0x29 | - | - | turn the shee entity left by 90 degrees |
turn right | 0x2A | - | - | turn the sheep entity right by 90 degrees |
found | 0x65 | * | 1 | object | checks if given object is located at the sheep entity's current position valid parameter values are: ball - 1.0 returns 1.0 if the object is found or 0.0 if there is no object |
query | 0x68 | * | 1 | subject | queries the given state (subject) of the virtual environment valid parameter values are: weather - 1.0 returns one of perfect (4.0), good (3.0), changing (2.0), bad (1.0) and horrible (0.0) time - 2.0 returns the current time as a value between 0.0 and 23.9 |
root | 0x6C | * | 1 | numerical value | calculates the sqare root of the given parameter |