home · contact · privacy
To client, add map examining cursor.
[plomrogue2-experiments] / new / plomrogue / tasks.py
index 6f2f1be9ee4397630059c35eece39ebd48bda99f..c54d0899b98ecb56ec2c4fe422ec357086951df2 100644 (file)
@@ -37,6 +37,8 @@ class Task_MOVE(Task):
 
     def check(self):
         test_pos = self.thing.world.map_.move(self.thing.position, self.args[0])
+        if test_pos is None:
+            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: