From 6c099014962718d32694d5f4205e6258d13c99c5 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Thu, 25 Jul 2024 21:29:18 -0600 Subject: [PATCH] Mods --- cromulant/ants.py | 6 +++++- cromulant/args.py | 2 ++ cromulant/argspec.py | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cromulant/ants.py b/cromulant/ants.py index e95a110..3a1f3e6 100644 --- a/cromulant/ants.py +++ b/cromulant/ants.py @@ -6,6 +6,7 @@ import itertools from typing import ClassVar, Any from .config import Config +from .args import Args from .utils import Utils from .storage import Storage @@ -180,7 +181,10 @@ class Ants: @staticmethod def get() -> None: - objs = Storage.get_ants() + if Args.clean: + objs = [] + else: + objs = Storage.get_ants() for obj in objs: ant = Ant() diff --git a/cromulant/args.py b/cromulant/args.py index 7fc9f21..40f48b4 100644 --- a/cromulant/args.py +++ b/cromulant/args.py @@ -20,6 +20,7 @@ class Args: height: int = 0 program: str = "" speed: str = "" + clean: bool = False @staticmethod def prepare() -> None: @@ -45,6 +46,7 @@ class Args: "height", "program", "speed", + "clean", ] for n_item in normals: diff --git a/cromulant/argspec.py b/cromulant/argspec.py index 8bbfbb0..35ec4fe 100644 --- a/cromulant/argspec.py +++ b/cromulant/argspec.py @@ -136,3 +136,9 @@ class ArgSpec: choices=["fast", "normal", "slow"], info="Use this update speed", ) + + ArgSpec.add_argument( + "clean", + action="store_true", + info="Start with clean ants data", + )