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()