May I suggest a change?
In class Mobil instead of using turn(45), use
setRotation(0); // right
setRotation(180); // left
setRotation(90); //down
setRotation(270); //up
and move(5);
and you can delete the nested if -elses, arah variable and the setLocations
A new version of this scenario was uploaded on 2016-05-25 02:10:50 UTC
2016/5/25
2016/5/25