This commit is contained in:
Auric Vente
2024-07-21 21:51:29 -06:00
parent 5b26219652
commit 0738b34652
2 changed files with 16 additions and 8 deletions

View File

@@ -318,9 +318,18 @@ class Game:
@staticmethod
def image_action(event: QMouseEvent, ant: Ant) -> None:
def is_terminated() -> bool:
return ant.method == "terminated"
if event.button() == Qt.LeftButton:
if is_terminated():
return
Ants.terminate(ant)
elif event.button() == Qt.MiddleButton:
if is_terminated():
return
Ants.merge(ant)
else:
Game.toggle_song()