summaryrefslogtreecommitdiff
path: root/Games/Minesweeper/Field.cpp
diff options
context:
space:
mode:
authorpfg <omegariisthebest@gmail.com>2020-02-02 03:07:23 -0800
committerGitHub <noreply@github.com>2020-02-02 12:07:23 +0100
commit2ed660490d54f250e7e83e276f023a0ad2610917 (patch)
treeda6e5f1d1027fe3463849cb4d89ab423d391db1c /Games/Minesweeper/Field.cpp
parentf9609fe08acb93f66d88e7c10a80f526f4a77b61 (diff)
downloadserenity-2ed660490d54f250e7e83e276f023a0ad2610917.zip
Minesweeper: Make sure first tile revealed is always blank (#1164)
Diffstat (limited to 'Games/Minesweeper/Field.cpp')
-rw-r--r--Games/Minesweeper/Field.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Games/Minesweeper/Field.cpp b/Games/Minesweeper/Field.cpp
index 5e59b4fe16..e31a90899c 100644
--- a/Games/Minesweeper/Field.cpp
+++ b/Games/Minesweeper/Field.cpp
@@ -339,7 +339,7 @@ void Field::paint_event(GPaintEvent& event)
void Field::on_square_clicked_impl(Square& square, bool should_flood_fill)
{
if (m_first_click) {
- while (square.has_mine) {
+ while (square.has_mine || square.number != 0) {
reset();
}
}