Mods
This commit is contained in:
parent
c79c61f79b
commit
6c09901496
|
@ -6,6 +6,7 @@ import itertools
|
||||||
from typing import ClassVar, Any
|
from typing import ClassVar, Any
|
||||||
|
|
||||||
from .config import Config
|
from .config import Config
|
||||||
|
from .args import Args
|
||||||
from .utils import Utils
|
from .utils import Utils
|
||||||
from .storage import Storage
|
from .storage import Storage
|
||||||
|
|
||||||
|
@ -180,7 +181,10 @@ class Ants:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get() -> None:
|
def get() -> None:
|
||||||
objs = Storage.get_ants()
|
if Args.clean:
|
||||||
|
objs = []
|
||||||
|
else:
|
||||||
|
objs = Storage.get_ants()
|
||||||
|
|
||||||
for obj in objs:
|
for obj in objs:
|
||||||
ant = Ant()
|
ant = Ant()
|
||||||
|
|
|
@ -20,6 +20,7 @@ class Args:
|
||||||
height: int = 0
|
height: int = 0
|
||||||
program: str = ""
|
program: str = ""
|
||||||
speed: str = ""
|
speed: str = ""
|
||||||
|
clean: bool = False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def prepare() -> None:
|
def prepare() -> None:
|
||||||
|
@ -45,6 +46,7 @@ class Args:
|
||||||
"height",
|
"height",
|
||||||
"program",
|
"program",
|
||||||
"speed",
|
"speed",
|
||||||
|
"clean",
|
||||||
]
|
]
|
||||||
|
|
||||||
for n_item in normals:
|
for n_item in normals:
|
||||||
|
|
|
@ -136,3 +136,9 @@ class ArgSpec:
|
||||||
choices=["fast", "normal", "slow"],
|
choices=["fast", "normal", "slow"],
|
||||||
info="Use this update speed",
|
info="Use this update speed",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ArgSpec.add_argument(
|
||||||
|
"clean",
|
||||||
|
action="store_true",
|
||||||
|
info="Start with clean ants data",
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue