12 base_dir=$(dirname $(readlink -f $BASH_SOURCE))
16 # start the computer as a coproc
17 coproc computer (run_program data)
19 while ( kill -0 $computer_PID >/dev/null 2>&1 ); do
20 get_robot_paint_colour >&${computer[1]}
21 read -u ${computer[0]} direction
22 read -u ${computer[0]} colour
23 do_robot_paint_and_move $direction $colour
27 # just incase the spinner is still about
30 # we've done all the painting, now lets display it
34 echo "Painted: $(get_robot_paint_count) panels at least once"