A Karel like environment for learning programming fundamentals. Currently supports the following programming languages.
- Python
- C
- Rust
To install from source, the instructions are provided below.
$ make
$ pip install --user .
ZKarel has a Karel simulator application that displays the world, and position of Karel in the world. The user can choose the world from the Karel simulator application menu. The Karel simulator application can be started using the following command.
$ karel-sim
The user can then create a workspace for writing programs to control Karel using the following command.
$ karel-init <lang>
The currently supported values for lang
are python
and clang
.
start()
- starts Karel, should be called before any other commandstop()
- stops Karel, should be called after all commands are completedmove()
- moves Karel one step forwardturn_left()
- turns Karel to the leftpick_beeper()
- picks one beeper from the current position, and places in beeper bagput_beeper()
- puts one beeper from the beeper bag, at the current positionfront_is_clear()
- returns true if there is no wall in the frontleft_is_clear()
- returns true if there is no wall in the leftright_is_clear()
- returns true if there is no wall in the rightbeeper()
- returns true if there is a beeper at the current positionnext_to_a_beeper()
- same asbeeper()
facing_north()
- returns true if Karel is facing northfacing_south()
- returns true if Karel is facing southfacing_east()
- returns true if Karel is facing eastfacing_west()
- returns true if Karel is facing westany_beepers_in_beeper_bag()
- returns true if there are beepers in beeper baggpsx()
- returns Karel's X positionavenue()
- same asgpsx()
gpsy()
- returns Karel's Y positionstreet()
- same asgpsy()