class ThingBase:
+ type_ = '?'
- def __init__(self, world, id_, type_='?', position=[0,0]):
+ def __init__(self, world, id_, position=[0,0]):
self.world = world
self.id_ = id_
- self.type_ = type_
self.position = position
class Thing(ThingBase):
+ blocking = False
+
+ def proceed(self):
+ pass
+
+
+
+class ThingItem(Thing):
+ type_ = 'item'
+
+
+
+class ThingAnimate(Thing):
+ blocking = True
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if stencil[thing.position] == '.':
visible_things += [thing]
return visible_things
+
+
+
+class ThingHuman(ThingAnimate):
+ type_ = 'human'
+
+
+
+class ThingMonster(ThingAnimate):
+ type_ = 'monster'