alles finito
This commit is contained in:
1 parent
0ae48588fb
commit
bc47b9c41e
2 files changed
+13
No files matched your search
@@ -40,3 +40,4 @@ class Game:
|
|||||||
|
|
||||||
def draw_game(self) -> None:
|
def draw_game(self) -> None:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@@ -55,6 +55,18 @@ class DoodleGame(Game):
|
|||||||
self.doodle = self.doodle.end_stroke()
|
self.doodle = self.doodle.end_stroke()
|
||||||
elif event.type == pygame.KEYDOWN and event.key == pygame.K_BACKSPACE:
|
elif event.type == pygame.KEYDOWN and event.key == pygame.K_BACKSPACE:
|
||||||
self.doodle = self.doodle.undo()
|
self.doodle = self.doodle.undo()
|
||||||
|
else:
|
||||||
|
return # andere Events nicht ausgeben
|
||||||
|
self.debug_print()
|
||||||
|
|
||||||
|
def debug_print(self) -> None:
|
||||||
|
d = self.doodle
|
||||||
|
print("---")
|
||||||
|
print("Striche aktuell :", len(d.strokes))
|
||||||
|
print("Stift aufgesetzt:", d.drawing)
|
||||||
|
print("Historie :", len(d.history), "Zustände")
|
||||||
|
for i, zustand in enumerate(d.history):
|
||||||
|
print(f" [{i}] {len(zustand)} Striche")
|
||||||
|
|
||||||
def update_game(self) -> bool:
|
def update_game(self) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in new issue
Block a user