if [ ${__robot_grid[$x,$y]+a} ]; then
echo ${__robot_grid[$x,$y]}
else
- if [ $x -eq 0 ] && [ $y -eq 0 ] && [ $__start_on_white -eq 1 ]; then
+ if [ $x -eq 0 ] && [ $y -eq 0 ] && [ $__robot_start_on_white -eq 1 ]; then
echo 1
else
echo 0
draw_panel() {
colours=("." "#")
- for (( y=$__robot_lowest_y; y<=$__robot_highest_y; y++ )); do
+ # we draw upside down, in effect, starting from the bottom and going to
+ # the top, so when outputting, we should switch that round
+ for (( y=$__robot_highest_y; y>=$__robot_lowest_y; y-- )); do
for (( x=$__robot_lowest_x; x<=$__robot_highest_x; x++ )); do
echo -n ${colours[$(get_paint_colour $x $y)]}
done