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