From b952fd79bdbf16525fc9ef2ebc881548ad0e3d3b Mon Sep 17 00:00:00 2001 From: Marek Baczynski Date: Fri, 27 Nov 2026 19:06:01 +0100 Subject: [PATCH] quick cleanup of old code --- main.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/main.py b/main.py index f82f3d4..5b7dbb9 100644 --- a/main.py +++ b/main.py @@ -60,8 +60,6 @@ def read_buttons(): else: sw2_t = 0 return(sw1_t + sw2_t) - -## ------------- BELL INVADERS START HERE ---------------- #global variables. Sue me. game_score = 0 @@ -336,8 +334,7 @@ while game_is_not_over_yet: else: for alien in Alien.get_all_active(): - alien.x += alien_step_direction - + alien.x += alien_step_direction for alien in Alien.get_all_active(): alien.update() @@ -380,14 +377,9 @@ while game_is_not_over_yet: # Hit detection bomb to player if bomb.y>60 and bomb.x > tank_x-3 and bomb.x < tank_x + 2: - game_is_not_over_yet = False - + game_is_not_over_yet = False + oled.fill_rect(bomb.x, bomb.y, 2, 3, 1) - - - # debug info - #debugvalue = game_score - #oled.text(str(debugvalue), 4, 50) oled.show() @@ -402,4 +394,4 @@ oled.fill_rect(20, 12, 88, 36, 0) oled.rect(19, 11, 90, 38, 1) oled.text("GAME OVER", 25, 17, 1) oled.text(str(game_score) + "pts", 25, 32, 1) -oled.show() \ No newline at end of file +oled.show()