alles finito

This commit is contained in:
kreischeran103444 committed 2026-11-05 14:09:32 +01:00
1 parent 0ae48588fb
commit bc47b9c41e
2 files changed
+13

No files matched your search

+1
View File
@@ -40,3 +40,4 @@ class Game:
def draw_game(self) -> None:
raise NotImplementedError
+12
View File
@@ -55,6 +55,18 @@ class DoodleGame(Game):
self.doodle = self.doodle.end_stroke()
elif event.type == pygame.KEYDOWN and event.key == pygame.K_BACKSPACE:
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:
return True