Replace the dot cursor after the player moved, not before

This commit is contained in:
Yohann D'ANELLO 2020-10-16 14:23:11 +02:00
parent 3daf58f51c
commit 57dd733c54

View File

@ -24,8 +24,8 @@ def main(stdscr):
stdscr.refresh()
for i in range(10) :
stdscr.addstr(cur[0],cur[1],'.')
key = stdscr.getkey()
stdscr.addstr(cur[0],cur[1],'.')
if key == 'z' :
if cur[0]>0 and M[cur[0]-1][cur[1]] != '#' :
cur[0] = cur[0]-1