Setting up "situations"

Karel programs are built on “situations”. Similarly, Greenfoot programs use pre-built scenarios. So JAKE programs, also, use Pattis’s situation model.


Up until now, it’s been possible to add robots, beepers and walls by clicking on the buttons down the side of the world editor. These objects were stationary and appeared, by default, in the centre of the World. As of this week’s latest version, the objects can be moved; this lets us set up complex scenarios, like the one below.

World objects can be moved around using a tool window that appears only when one is selected.

These screenshots are from the JAKE IDE. When the JAKE program is run (from the toolbar or with F5), the program represented in the world editor is transcribed into Java and compiled. The resulting program, running in Java, looks like this:

Thus, we can now create situations in JAKE, and see them running in Java.

Leave a Reply

Your email address will not be published. Required fields are marked *