From d2a8898e4d42fcf2c4cb51e9117690ae1616e350 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 14 Oct 2010 10:01:14 +1000 Subject: Make minehunt less cheerful An instance of failure being improperly shown as victory was rectified. Task-number: QT-3956 --- demos/declarative/minehunt/minehunt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()); -- cgit v0.12