tests: verarbeite kritische Treffer
This commit is contained in:
@@ -11,14 +11,29 @@ class ItemTypes(enum.Enum):
|
||||
SUSTAINMENT = 7
|
||||
|
||||
|
||||
class ItemStatus(enum.Flag):
|
||||
FINE = 0
|
||||
DAMAGED = 1
|
||||
DESTROYED = 2
|
||||
|
||||
|
||||
class Item(object):
|
||||
def __init__(self, item_type: ItemTypes):
|
||||
self._type = item_type
|
||||
self._state = ItemStatus.FINE
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return self._type
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
return self._state
|
||||
|
||||
@state.setter
|
||||
def state(self, new_state: ItemStatus):
|
||||
self._state = new_state
|
||||
|
||||
|
||||
class BigItem(Item):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user