diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-14 05:53:13 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-14 05:53:13 +0200 |
commit | 0e30f4e4120240b43b24fe728b571b2c00da46a1 (patch) | |
tree | 90709da93cee9b5ee8b2e9d3eda2f83027ad5c49 /Games | |
parent | a3e8fc3d9c57651a25d42b9ccd2b6dc7384f7596 (diff) | |
download | serenity-0e30f4e4120240b43b24fe728b571b2c00da46a1.zip |
Minesweeper: Flood fill should include the first numbered found.
Diffstat (limited to 'Games')
-rw-r--r-- | Games/Minesweeper/Field.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Games/Minesweeper/Field.cpp b/Games/Minesweeper/Field.cpp index 25deb47b03..00161aa8c1 100644 --- a/Games/Minesweeper/Field.cpp +++ b/Games/Minesweeper/Field.cpp @@ -157,6 +157,8 @@ void Field::flood_fill(Square& square) for_each_neighbor_of(square, [this] (auto& neighbor) { if (!neighbor.is_swept && !neighbor.has_mine && neighbor.number == 0) flood_fill(neighbor); + if (!neighbor.has_mine && neighbor.number) + on_square_clicked(neighbor); }); } |