| conditions {karel} | R Documentation |
Conditions that Karel can test
Description
These group of functions return a logical value TRUE o FALSE according to Karel's evaluation of her world.
Usage
front_is_clear()
front_is_blocked()
left_is_clear()
left_is_blocked()
right_is_clear()
right_is_blocked()
beepers_present()
no_beepers_present()
karel_has_beepers()
karel_has_no_beepers()
facing_east()
facing_west()
facing_north()
facing_south()
Details
The functions front_is_clear(), front_is_blocked(), left_is_clear(), left_is_blocked(), right_is_clear() y right_is_blocked() test if there is a wall in front of Karel, to her left or to her right, respectively. The functions beepers_present() y no_beepers_present() test if there are or there are not beepers at Karel's current position. The functions karel_has_beepers() y karel_has_no_beepers() test if Karel has or hasn't got beepers in her bag (not visible in the plot). The functions facing_east(), facing_west(), facing_north() y facing_south() test the direction to which Karel is facing right now.
Value
Logical value TRUE or FALSE.
See Also
Examples
generate_world("mundo001")
front_is_clear()
front_is_blocked()
left_is_clear()
left_is_blocked()
right_is_clear()
right_is_blocked()
beepers_present()
no_beepers_present()
karel_has_beepers()
karel_has_no_beepers()
facing_east()
facing_west()
facing_north()
facing_south()
[Package karel version 0.1.1 Index]