diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-10-14 00:01:14 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-10-14 00:01:14 (GMT) |
commit | d2a8898e4d42fcf2c4cb51e9117690ae1616e350 (patch) | |
tree | edbf3b5323482de4c151458d787674897b8e093d | |
parent | 28ef9731df2b3cd865af89cc474c5fa20c24e492 (diff) | |
download | Qt-d2a8898e4d42fcf2c4cb51e9117690ae1616e350.zip Qt-d2a8898e4d42fcf2c4cb51e9117690ae1616e350.tar.gz Qt-d2a8898e4d42fcf2c4cb51e9117690ae1616e350.tar.bz2 |
Make minehunt less cheerful
An instance of failure being improperly shown as victory was rectified.
Task-number: QT-3956
-rw-r--r-- | demos/declarative/minehunt/minehunt.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp index 9c82f30..709d945 100644 --- a/demos/declarative/minehunt/minehunt.cpp +++ b/demos/declarative/minehunt/minehunt.cpp @@ -195,6 +195,7 @@ bool MinehuntGame::flip(int row, int col) won = false; hasWonChanged(); setPlaying(false); + return true; } remaining--; @@ -202,6 +203,7 @@ bool MinehuntGame::flip(int row, int col) won = true; hasWonChanged(); setPlaying(false); + return true; } return true; } @@ -209,7 +211,7 @@ bool MinehuntGame::flip(int row, int col) bool MinehuntGame::flag(int row, int col) { TileData *t = tile(row, col); - if(!t) + if(!t || !playing) return false; t->setHasFlag(!t->hasFlag()); |