This commit is contained in:
Auric Vente
2024-07-18 23:30:42 -06:00
parent d989ac45a8
commit 0579aa140d
4 changed files with 25 additions and 17 deletions

View File

@@ -37,7 +37,9 @@ class Ant:
self.status = data["status"]
self.hits = data["hits"]
self.triumph = data["triumph"]
self.color = tuple(data["color"])
c = data["color"]
self.color = (c[0], c[1], c[2])
def get_name(self) -> str:
return self.name or "Nameless"
@@ -136,4 +138,4 @@ class Ants:
for obj in objs:
ant = Ant()
ant.from_dict(obj)
Ants.ants.append(ant)
Ants.ants.append(ant)