pythonified
This commit is contained in:
parent
b04ebc5bef
commit
765bb47652
1 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ class MainScreen(Screen):
|
|||
case tcod.event.KeyDown(sym=sym) if sym in DIRECTION_KEYS:
|
||||
new_pos = player.components[Position] + DIRECTION_KEYS[sym]
|
||||
map_pos = world_pos_to_map_pos(new_pos)
|
||||
if not map.walkable[map_pos.y][map_pos.x]:
|
||||
if not map.walkable[map_pos.y, map_pos.x]:
|
||||
return None
|
||||
player.components[Position] = new_pos
|
||||
cam_map = world_pos_to_map_pos(new_pos)
|
||||
|
|
@ -76,7 +76,7 @@ class MainScreen(Screen):
|
|||
map_pos = world_pos_to_map_pos(e_pos)
|
||||
if (-w <= screen_pos.x < w\
|
||||
and -h <= screen_pos.y < h):
|
||||
if map.fov[map_pos.y][map_pos.x]:
|
||||
if map.fov[map_pos.y, map_pos.x]:
|
||||
graphic = e_graph
|
||||
else:
|
||||
graphic = Graphic(0x2591, (50, 50, 50))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue