Karel The Robot was invented in th 1970s by Richard E. Pattis at Standford Univeristy. Karel The Robot is a program, that should make the intruduction to coding for newcomers and beginners more simple. Its aim is to teach basic principles such as top-down programming and establish them from the beginning. Futhermore is learning programming with Karel The Robot a way more visual and rewarding experience then just printing out some strings and numbers onto the command-line.
Also see hendrikboeck/karel_the_robot_python3_backend.
The frontend connects to the PBE-pipe via a TCP-socket (tcp/14480
). As a JSON-Writer and JSON-Reader the simplejson-c library is used. Currently StarterProjects for CLion and simple CMake projects are supported. StarterProjects can either be built from the repository (see 2. Create a Starter-Project) or downloaded from the Releases section.
You can create various StarterProjects for various Operating Systems through the Makefile
.
make <target>
Values for <target>
:
all
: creates CMake and CLion Projects and creates them as dynamic and static.cmake_static
: creates a CMake Project, where all libraries are precompiled and staticly linked.cmake_dynamic
: creates a CMake Project, where all libraries and resources are downloaded and compiled in the build-process.clion_static
: creates a CLion Project, where all libraries are precompiled and staticly linked.clion_dynamic
: creates a CLion Project, where all libraries and resources are downloaded and compiled in the build-process.
The header-file karel.h
can be found at res/karel.h
.
#include "karel.h"
void turnRight();
void moveToWall();
int main(void) {
loadWorld("LivingRoom");
moveToWall();
turnLeft();
move();
turnRight();
...
return 0;
}
void turnRight() {
turnLeft();
turnLeft();
turnLeft();
}
void moveToWall() {
while(frontIsClear())
move();
}
- Karel The Robot by Richard E. Pattis at Stanford University
- KarelLearnsC by OTHRegensburgMedieninformatik