laneya

multiplayer roguelike game
git clone https://git.ce9e.org/laneya.git

commit
476c965ad54f692aa8a8aaff495f8b84ef3d9801
parent
d1c6fe6a33122bc08b638f26d5897140fabd70f2
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2018-08-03 15:08
fix integer devision

Diffstat

M laneya/map.py 8 ++++----

1 files changed, 4 insertions, 4 deletions


diff --git a/laneya/map.py b/laneya/map.py

@@ -85,10 +85,10 @@ class MapManager(object):
   85    85             if i != 0:
   86    86                 last = rooms[i - 1]
   87    87 
   88    -1                 x_center = (room['x_max'] + room['x_min']) / 2
   89    -1                 y_center = (room['y_max'] + room['y_min']) / 2
   90    -1                 last_x_center = (last['x_max'] + last['x_min']) / 2
   91    -1                 last_y_center = (last['y_max'] + last['y_min']) / 2
   -1    88                 x_center = (room['x_max'] + room['x_min']) // 2
   -1    89                 y_center = (room['y_max'] + room['y_min']) // 2
   -1    90                 last_x_center = (last['x_max'] + last['x_min']) // 2
   -1    91                 last_y_center = (last['y_max'] + last['y_min']) // 2
   92    92 
   93    93                 x_min = min(x_center, last_x_center)
   94    94                 x_max = max(x_center, last_x_center) + 1