diff options
author | Daniel Jones <admin@danieljon.es> | 2020-06-12 01:11:22 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-06-12 01:11:22 +0930 |
commit | bf62f709938dcb5644dc8e4bc9d9cf5750bcd1a5 (patch) | |
tree | 2e20c1dc852946934b7747055415208dbf3c9749 | |
parent | 9439f3beb0d6fe8632b793b7957dc6cb512117ff (diff) | |
download | foxminesweeper-bf62f709938dcb5644dc8e4bc9d9cf5750bcd1a5.tar.gz foxminesweeper-bf62f709938dcb5644dc8e4bc9d9cf5750bcd1a5.zip |
cannot flag revealed tile
-rw-r--r-- | MainWindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/MainWindow.cpp b/MainWindow.cpp index 063b22b..db72c9e 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -278,6 +278,8 @@ MainWindow::on_Tile_Right_Click(FXObject *sender, FXSelector sel, void *data) x = matrix->colOfChild(button); y = matrix->rowOfChild(button); tile = board->get_tile_at(x, y); + if (tile->is_revealed()) + return 1; printf("right click on: %d, %d\n", tile->get_x(), tile->get_y()); tile->toggle_flag(Tile::FLAGGED); printf("%d\n", tile->is_flagged()); |