raise GameError('would move outside map bounds')
if self.thing.world.map_[test_pos] != '.':
raise GameError('%s would move into illegal terrain' % self.thing.id_)
- for t in self.thing.world.things:
- if t.blocking and t.position == test_pos:
+ for t in self.thing.world.things_at_pos(test_pos):
+ if t.blocking:
raise GameError('%s would move into other thing' % self.thing.id_)
def do(self):