This commit is contained in:
Auric Vente
2024-07-21 06:59:17 -06:00
parent 6486cea6d8
commit 2ce7464786
2 changed files with 7 additions and 47 deletions

View File

@@ -8,7 +8,6 @@ from typing import ClassVar, Any
from .config import Config
from .utils import Utils
from .storage import Storage
from .window import Window
class Ant:
@@ -89,33 +88,6 @@ class Ants:
Ants.save()
Game.update_info()
@staticmethod
def terminate() -> None:
from .game import Game
ant = Ants.random_ant()
if not ant:
return
Ants.ants.remove(ant)
Ants.save()
Ants.announce_terminate(ant)
Game.update_info()
@staticmethod
def terminate_all() -> None:
from .game import Game
def action() -> None:
Ants.ants = []
Ants.save()
Window.clear_view()
Game.update_info()
Window.confirm("Terminate all ants?", action)
@staticmethod
def random_ant(ignore: list[Ant] | None = None) -> Ant | None:
if ignore: