home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71a6158
)
Avoid Thing collisions.
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 10 Jan 2019 00:49:46 +0000
(
01:49
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 10 Jan 2019 00:49:46 +0000
(
01:49
+0100)
server_/game.py
patch
|
blob
|
history
diff --git
a/server_/game.py
b/server_/game.py
index 878917fbda7711a741c53a981737be741942ffda..66ce62d605bbfda677395a560b819a1e43f4c71d 100644
(file)
--- a/
server_/game.py
+++ b/
server_/game.py
@@
-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):