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 committed by Nicolas Margulies
parent 6e544bf02e
commit e448697e6b
1 changed files with 1 additions and 1 deletions

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