11 # program assumes 0 based, we're 1 based, apparently
15 echo -en '\033['$y';'$x'f'
56 local scoreboard_width=43
57 move_cursor 0 $scoreboard_y
59 printf "%.0s-" {1..42}
62 printf "%.0s " {1..42}
65 printf "%.0s-" {1..42}
70 update_score_board() {
71 local value=${1:-$__arcade_score}
73 if [ $value -gt 0 ]; then
79 arcade_screen_init() {
85 arcade_screen_update() {
94 arcade_screen_finish() {
97 echo high score: $__arcade_score
105 # first, clear the screen and hide the cursor
114 if [ $x -gt $max_x ]; then
117 if [ $y -gt $max_y ]; then
125 if [ ${blocks[$x,$y]+a} ]; then
135 move_cursor 0 $((max_y+4))
136 echo "We have ${#blocks[@]} blocks on the screen"
137 echo "The maximum x was $max_x"
138 echo "The maximum y was $max_y"