From 697f8e1fa9ad036ca769ee546d73a2a71b59f5fd Mon Sep 17 00:00:00 2001 From: Megamichi Date: Fri, 23 Feb 2024 15:33:52 +0100 Subject: [PATCH] hmpf --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index cb66fdf..0e7a66b 100644 --- a/main.py +++ b/main.py @@ -67,6 +67,8 @@ def verarbeite_feld(feld): bellowr = feld2[(y+1)%feldy][(x+1)%feldx] bellowl = feld2[(y+1)%feldy][(x-1)%feldx] direction = random.choice([-1, 1]) # Zufällige Auswahl der Richtung + if bellow == "#": + break if bellow == " ": feld2[y][x] = feld[(y+1)%feldy][x] feld2[(y+1)%feldy][x] = feld[y][x] @@ -94,12 +96,13 @@ screensize = pygame.display.get_window_size() clock = pygame.time.Clock() default_font = pygame.font.SysFont("sans", 14) feld,feldx,feldy = make_feld(20) +feld[feldy-1][0] = "#" acolor = (255,0,0) wechselfarbe = "r" using_element = "a" pixelsize = 20 -display_mode = "durchfallen" +#display_mode = "durchfallen" show_debug = False running = True @@ -151,6 +154,7 @@ if __name__ == "__main__": wechselfarbe = "r" acolor = r,g,b color_key = {" ":(0,0,0), + "#":(100,100,100), "a":acolor} draw_feld(feld,color_key,(pixelsize,pixelsize)) mx,my = pygame.mouse.get_pos()