diff --git a/states/game.lua b/states/game.lua index 1432a90..649888a 100644 --- a/states/game.lua +++ b/states/game.lua @@ -39,7 +39,6 @@ function state_game() local x = mid(1, (mouse_x - board_x) \ tw + 1, bw) local y = mid(1, (mouse_y - board_y) \ tw + 1, bw) selected_id = board:xy_idx(x,y) - -- printh("x: " .. x .. " y: " .. y .. " id: " .. selected_id) end local function check_endgame() @@ -62,6 +61,8 @@ function state_game() end local function _update() + update_mouse() + local size = board:get_size() local x, y = board:idx_xy(selected_id) local moved = false @@ -88,8 +89,6 @@ function state_game() show_clues() end - update_mouse() - if (x<1) x=size if (x>size) x=1 if (y<1) y=size