From 959ed6bfdad144c0d52e13135f570c7c97492ea5 Mon Sep 17 00:00:00 2001 From: Mateusz Dokowicz Date: Thu, 30 Mar 2023 18:45:52 +0200 Subject: [PATCH] added some properties --- domain/entities/cat.py | 1 + domain/entities/garbage.py | 11 +++++++++++ domain/entities/plant.py | 10 ++++++++++ domain/entities/vacuum.py | 5 ++++- 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 domain/entities/garbage.py create mode 100644 domain/entities/plant.py diff --git a/domain/entities/cat.py b/domain/entities/cat.py index 807e490..a0acd5b 100644 --- a/domain/entities/cat.py +++ b/domain/entities/cat.py @@ -11,4 +11,5 @@ class Cat(Entity): self.cooldown = 1000 self.velocity = 1 self.busy = False + self.sleeping = False self.direction = 0 diff --git a/domain/entities/garbage.py b/domain/entities/garbage.py new file mode 100644 index 0000000..c93501d --- /dev/null +++ b/domain/entities/garbage.py @@ -0,0 +1,11 @@ +from domain.entities.entity import Entity +from domain.world import World + + +class Garbage(Entity): + def __init__(self, x: int, y: int): + super().__init__(x, y, "GARBAGE") + self.wet = False + self.size = 0 + + # TODO GARBAGE: add more properties diff --git a/domain/entities/plant.py b/domain/entities/plant.py new file mode 100644 index 0000000..3d17fb2 --- /dev/null +++ b/domain/entities/plant.py @@ -0,0 +1,10 @@ +from domain.entities.entity import Entity +from domain.world import World + + +class Plant(Entity): + def __init__(self, x: int, y: int): + super().__init__(x, y, "PLANT") + self.watered = 100 + + # TODO PLANT: add more properties to diff --git a/domain/entities/vacuum.py b/domain/entities/vacuum.py index eaa14e5..03fa7d8 100644 --- a/domain/entities/vacuum.py +++ b/domain/entities/vacuum.py @@ -6,4 +6,7 @@ class Vacuum(Entity): def __init__(self, x: int, y: int): super().__init__(x, y, "VACUUM") self.battery = 100 - # TODO add more properties + self.cleaning_detergent = 100 + self.container_filling = 0 + + # TODO VACUUM: add more properties