From 4914b5d08f190fec418cf500acb3a3ff68f8b480 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 10 Nov 2021 13:03:25 -0800 Subject: [PATCH] why do we refresh screen after reading keyboard? --- hanoi.lua | 2 -- hanoi.teliva | 2 -- 2 files changed, 4 deletions(-) diff --git a/hanoi.lua b/hanoi.lua index 0d36c52..a715fe5 100644 --- a/hanoi.lua +++ b/hanoi.lua @@ -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 diff --git a/hanoi.teliva b/hanoi.teliva index 04b4491..47fde20 100644 --- a/hanoi.teliva +++ b/hanoi.teliva @@ -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