hmpf
This commit is contained in:
parent
914262698b
commit
697f8e1fa9
1 changed files with 5 additions and 1 deletions
6
main.py
6
main.py
|
@ -67,6 +67,8 @@ def verarbeite_feld(feld):
|
||||||
bellowr = feld2[(y+1)%feldy][(x+1)%feldx]
|
bellowr = feld2[(y+1)%feldy][(x+1)%feldx]
|
||||||
bellowl = 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
|
direction = random.choice([-1, 1]) # Zufällige Auswahl der Richtung
|
||||||
|
if bellow == "#":
|
||||||
|
break
|
||||||
if bellow == " ":
|
if bellow == " ":
|
||||||
feld2[y][x] = feld[(y+1)%feldy][x]
|
feld2[y][x] = feld[(y+1)%feldy][x]
|
||||||
feld2[(y+1)%feldy][x] = feld[y][x]
|
feld2[(y+1)%feldy][x] = feld[y][x]
|
||||||
|
@ -94,12 +96,13 @@ screensize = pygame.display.get_window_size()
|
||||||
clock = pygame.time.Clock()
|
clock = pygame.time.Clock()
|
||||||
default_font = pygame.font.SysFont("sans", 14)
|
default_font = pygame.font.SysFont("sans", 14)
|
||||||
feld,feldx,feldy = make_feld(20)
|
feld,feldx,feldy = make_feld(20)
|
||||||
|
feld[feldy-1][0] = "#"
|
||||||
acolor = (255,0,0)
|
acolor = (255,0,0)
|
||||||
wechselfarbe = "r"
|
wechselfarbe = "r"
|
||||||
using_element = "a"
|
using_element = "a"
|
||||||
pixelsize = 20
|
pixelsize = 20
|
||||||
|
|
||||||
display_mode = "durchfallen"
|
#display_mode = "durchfallen"
|
||||||
|
|
||||||
show_debug = False
|
show_debug = False
|
||||||
running = True
|
running = True
|
||||||
|
@ -151,6 +154,7 @@ if __name__ == "__main__":
|
||||||
wechselfarbe = "r"
|
wechselfarbe = "r"
|
||||||
acolor = r,g,b
|
acolor = r,g,b
|
||||||
color_key = {" ":(0,0,0),
|
color_key = {" ":(0,0,0),
|
||||||
|
"#":(100,100,100),
|
||||||
"a":acolor}
|
"a":acolor}
|
||||||
draw_feld(feld,color_key,(pixelsize,pixelsize))
|
draw_feld(feld,color_key,(pixelsize,pixelsize))
|
||||||
mx,my = pygame.mouse.get_pos()
|
mx,my = pygame.mouse.get_pos()
|
||||||
|
|
Loading…
Reference in a new issue