From e39255d921d17ea46c9c4516319efb44f60598ba Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 8 Nov 2023 19:23:04 +0100 Subject: [PATCH] minors --- snake_arduino/snake_arduino.ino | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/snake_arduino/snake_arduino.ino b/snake_arduino/snake_arduino.ino index 652a0c2..c0d0653 100644 --- a/snake_arduino/snake_arduino.ino +++ b/snake_arduino/snake_arduino.ino @@ -63,11 +63,7 @@ void setup() { randomSeed(analogRead(0)); } -void game_over() { - // show gameover frame - matrix.loadFrame(frame_game_over); - delay(1000); - +void show_points_inside_matrix() { // show points inside the matrix // clear the old frame for (int i=0; i < 12; i++) { @@ -87,6 +83,13 @@ void game_over() { running= false; } +void game_over() { + // show gameover frame + matrix.loadFrame(frame_game_over); + delay(1000); + show_points_inside_matrix(); +} + void add_tail_block() { snake_len++;