Jeka is project inspired by Karel.
Karel is an educational programming language for beginners, created by Richard E. Pattis in his book Karel The Robot: A Gentle Introduction to the Art of Programming.
Jeka is friendly dog that lives in an environment consisting of a grid of streets (left-right) and avenues (up-down). Jeka understands basic instructions:
moveForward
: Jeka moves by one square in the direction he is facingturnLeft
: Jeka turns 90 ° leftwoof
: Jeka barks at you (friendly)frontIsClear
: Jeka tells you if you can move forward in the facing directionhasBones
: Jeka tells you if there is a bone on the current positionputBone
: Jeka puts a bone on the square he is standing atpickBone
: Jeka picks a bone from the square he is standing at
Jeka has 4 main modules:
- Mustang (custom language interpreter that takes the code you write and translates it to the commands known to Jeka)
- BoardController (module that takes care of drawing Jeka, Jeka's World and Jeka's moves)
- Engine (module that is responsible for connecting
Mustang
andBoardController
- CodeController (module that takes care of getting user's input to the
Engine
)
Valid Jeka code example (success of running directly this code depends in the Jeka's World)
moveForward();
turnLeft();
fun turnRight(){
turnLeft();
turnLeft();
}
var i = 0;
while(i < 5){
turnRight();
i = i + 1;
}
while(frontIsClear()){
moveForward();
}
while(hasBones()){
pickBone();
}
putBone();
turnRight();
In the project directory, you can run:
Runs the app in the development mode on port: 3000.
Typescript check.
Builds the app for production to the build
folder.