diff options
Diffstat (limited to 'src/game_tab/left_panel/board/BoardCanvas.hpp')
| -rw-r--r-- | src/game_tab/left_panel/board/BoardCanvas.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp index e7f28dd..cd8ace9 100644 --- a/src/game_tab/left_panel/board/BoardCanvas.hpp +++ b/src/game_tab/left_panel/board/BoardCanvas.hpp @@ -27,7 +27,7 @@ wxDECLARE_EVENT(PLAY_MOVE_EVENT, wxCommandEvent); file = 7 - file; \ rank = 7 - rank; \ } \ - bool IsCurrentSquareValid = file >= 0 && file <= 7 && rank >= 0 && rank <= 7; + bool IsCurrentSquareValid = file <= 7 && rank <= 7; // Do not need to check rank>=0 and file>=0 since unsigned int #define MOUSE_ON(x, y, width, height) \ (mouseX >= (x) && mouseX <= ((x) + (width)) && mouseY >= (y) && \ @@ -100,7 +100,7 @@ class BoardCanvas : public wxPanel { // Various canvas state variables bool black_side, is_dragging, valid_drag, arrow_drag, is_black_turn; - std::uint32_t boardX, boardY, square_width, piece_width, mouseX, mouseY, lastClickX, + std::int32_t boardX, boardY, square_width, piece_width, mouseX, mouseY, lastClickX, lastClickY; wxSize canvas_size; wxPoint active_square; |
