07.10.26
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
+4
-3
@@ -2,7 +2,7 @@ import copy
|
|||||||
import pygame
|
import pygame
|
||||||
|
|
||||||
class MeinSpiel:
|
class MeinSpiel:
|
||||||
bilder = ["Bilder/Grass.jpg","Bilder/Hase.jpg","Bilder/blau.png","Bilder/korb.png"]
|
bilder = ["Bilder/Grass.jpg","Bilder/Hase.jpg","Bilder/blau.png","Bilder/korb.png", "Bilder/apfel.png"]
|
||||||
spielfeld = []
|
spielfeld = []
|
||||||
|
|
||||||
def __init__(self, felderX, felderY):
|
def __init__(self, felderX, felderY):
|
||||||
@@ -12,7 +12,7 @@ class MeinSpiel:
|
|||||||
self.spielfeld[x].append(2)
|
self.spielfeld[x].append(2)
|
||||||
|
|
||||||
def anfangsKonfiguration(self):
|
def anfangsKonfiguration(self):
|
||||||
self.spielfeld[5][5]=2
|
self.spielfeld[5][5]=4
|
||||||
self.spielfeld[2][6]=3
|
self.spielfeld[2][6]=3
|
||||||
for i in range(14):
|
for i in range(14):
|
||||||
self.spielfeld[i][13]=0
|
self.spielfeld[i][13]=0
|
||||||
@@ -47,7 +47,8 @@ class MeinSpiel:
|
|||||||
if pygame.K_s == taste:
|
if pygame.K_s == taste:
|
||||||
for x in range (len(self.spielfeld)):
|
for x in range (len(self.spielfeld)):
|
||||||
for y in range (len(self.spielfeld[x])):
|
for y in range (len(self.spielfeld[x])):
|
||||||
if self.spielfeld[x][y] == 3:
|
if self.spielfeld[x][y] == 3 and y < 12:
|
||||||
|
|
||||||
kontrollfeld[x][y+1] = 3
|
kontrollfeld[x][y+1] = 3
|
||||||
kontrollfeld[x][y] = 2
|
kontrollfeld[x][y] = 2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user