The animation of the robot is using a DFS algorithm to explore the arena and pick up the markers. This assumes that the robot has no knowledge of the arena layout at the start and only knows about its location and direction and the size of the arena. The robot will explore the arena until all markers are picked up.
gcc -o build/main main.c graphics.c arena.c common.c robot.c arenaModel.c robotNav.c
./build/main [Starting X coordinate of robot] [Starting Y coordinate of robot] [Starting direction of robot, 1 = NORTH ... 4 = WEST] | java -jar drawapp-4.5.jar
e.g.
./build/main 10 10 3 | java -jar drawapp-4.5.jar
The program flickers a bit when the robot picks up a marker. Markers are drawn on the background layer along with the walls which causes this problem. Having a third layer could fix this as the walls would not need to be redrawn everytime a maker is picked up.