package Kaja.sandbox.sandbox;
/*Generated by MPS */
import JavaKaja.runtime.KajaFrame;
import JavaKaja.runtime.Direction;
public class Sample extends KajaFrame {
public Sample() {
}
protected void perform() {
if (canMove()) {
moveKaja();
pause();
} else {
reportError("Oops, There's a wall in front of me. I can't make a step forward.");
}
while (!(heading(Direction.south))) {
try {
turnLeft();
pause();
} finally {
}
}
while (!(isWall())) {
if (canMove()) {
moveKaja();
pause();
} else {
reportError("Oops, There's a wall in front of me. I can't make a step forward.");
}
}
if (!(isFull())) {
addMark();
pause();
} else {
reportError("Cannot drop. The cell is already full.");
}
turn_SPACE_right_routine();
}
public void turn_SPACE_right_routine() {
for (int indexVariable_kf1bs5_a0a = 0; indexVariable_kf1bs5_a0a < 3; indexVariable_kf1bs5_a0a++) {
try {
turnLeft();
pause();
} finally {
}
}
}
public static void main(String[] args) {
Sample script = new Sample();
script.initializeComponents();
script.run();
}
}