Merge pull request 'added some properties' (#15) from Add-Properties into main

Reviewed-on: s473601/Machine_learning_2023#15
Reviewed-by: Tim Barvenov <timbar@st.amu.edu.pl>
This commit is contained in:
Tim Barvenov 2023-03-30 19:26:53 +02:00
commit 2929495348
4 changed files with 26 additions and 1 deletions

View File

@ -11,4 +11,5 @@ class Cat(Entity):
self.cooldown = 1000 self.cooldown = 1000
self.velocity = 1 self.velocity = 1
self.busy = False self.busy = False
self.sleeping = False
self.direction = 0 self.direction = 0

View File

@ -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

10
domain/entities/plant.py Normal file
View File

@ -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

View File

@ -6,4 +6,7 @@ class Vacuum(Entity):
def __init__(self, x: int, y: int): def __init__(self, x: int, y: int):
super().__init__(x, y, "VACUUM") super().__init__(x, y, "VACUUM")
self.battery = 100 self.battery = 100
# TODO add more properties self.cleaning_detergent = 100
self.container_filling = 0
# TODO VACUUM: add more properties