1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

Minesweeper: Flood fill should include the first numbered found.

This commit is contained in:
Andreas Kling 2019-04-14 05:53:13 +02:00
parent a3e8fc3d9c
commit 0e30f4e412

View file

@ -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);
});
}