home · contact · privacy
Avoid Thing collisions.
[plomrogue2-experiments] / server_ / game.py
index 878917fbda7711a741c53a981737be741942ffda..66ce62d605bbfda677395a560b819a1e43f4c71d 100644 (file)
@@ -79,6 +79,9 @@ class Task:
             map_tile = self.thing.world.terrain_map[pos_i]
             if map_tile != '.':
                 raise GameError('would move into illegal terrain')
+            for t in self.thing.world.things:
+                if t.position == test_pos:
+                    raise GameError('would move into other thing')
 
 
 class Thing(game_common.Thing):