diff options
-rw-r--r-- | arduino_sketch/arcerino/arcerino.ino | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arduino_sketch/arcerino/arcerino.ino b/arduino_sketch/arcerino/arcerino.ino index 72329c5..e19b00a 100644 --- a/arduino_sketch/arcerino/arcerino.ino +++ b/arduino_sketch/arcerino/arcerino.ino @@ -173,7 +173,9 @@ void draw_game() { void draw_score() { TV.clear_screen(); draw_board(); - TV.draw_circle(x+LCD_0X,y+LCD_0Y,6,WHITE,WHITE); + if ( x > -LCD_MAX && x < LCD_MAX && y > -LCD_MAX && y < LCD_MAX ) { + TV.draw_circle(x+LCD_0X,y+LCD_0Y,6,WHITE,WHITE); + } TV.delay(3000); TV.clear_screen(); } @@ -227,7 +229,7 @@ void update_position() { } char get_score() { - int d = sqrt(pow(x,2) + pow(y,2)) / 4; + int d = sqrt(pow(x,2) + pow(y,2)) * 6 / LCD_MAX ; switch(d) { case 0: return 10; |