fixed weird movement bug

This commit is contained in:
lickthecheese 2020-03-21 18:26:21 -04:00
parent 742e78c853
commit 62e110a963

2
nlong
View file

@ -73,11 +73,13 @@ def main(stdscr):
cx = min(width-1, cx+1) cx = min(width-1, cx+1)
with open(dataPath, 'w') as outfile: with open(dataPath, 'w') as outfile:
json.dump(data, outfile) json.dump(data, outfile)
tx = cx + (vx * width) - width // 2
# draw the screen # draw the screen
stdscr.move(0, 0) stdscr.move(0, 0)
for y in range(height-1): for y in range(height-1):
for x in range(width): for x in range(width):
stdscr.move(y,x)
stdscr.addstr(data.get(str((ty - cy + y,tx - cx + x)), ' ')) stdscr.addstr(data.get(str((ty - cy + y,tx - cx + x)), ' '))