why do we refresh screen after reading keyboard?

This commit is contained in:
Kartik K. Agaram 2021-11-10 13:03:25 -08:00
parent dab2a1fbf3
commit 4914b5d08f
2 changed files with 0 additions and 4 deletions

View File

@ -74,10 +74,8 @@ end
local function update(window)
window:mvaddstr(lines(window)-2, 5, "tower to remove top disk from? ")
local from = string.byte(curses.getch()) - 96
curses.refresh()
window:mvaddstr(lines(window)-1, 5, "tower to stack it on? ")
local to = string.byte(curses.getch()) - 96
curses.refresh()
make_move(from, to)
end

View File

@ -74,10 +74,8 @@ end
local function update(window)
window:mvaddstr(lines(window)-2, 5, "tower to remove top disk from? ")
local from = curses.getch() - 96
curses.refresh()
window:mvaddstr(lines(window)-1, 5, "tower to stack it on? ")
local to = curses.getch() - 96
curses.refresh()
make_move(from, to)
end