[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kmines/viranch/qtquick] src/qml: Correctly flag the unflagged mine cells on winning the game
From:       Viranch Mehta <viranch.mehta () gmail ! com>
Date:       2013-03-28 11:59:43
Message-ID: 20130328115943.49321A6123 () git ! kde ! org
[Download RAW message or body]

Git commit ae91d224ec715504c15ff8761f99b7e874cf9e33 by Viranch Mehta.
Committed on 14/08/2012 at 13:11.
Pushed by viranch into branch 'viranch/qtquick'.

Correctly flag the unflagged mine cells on winning the game

M  +1    -1    src/qml/logic.js

http://commits.kde.org/kmines/ae91d224ec715504c15ff8761f99b7e874cf9e33

diff --git a/src/qml/logic.js b/src/qml/logic.js
index 53de6d1..3712884 100644
--- a/src/qml/logic.js
+++ b/src/qml/logic.js
@@ -144,7 +144,7 @@ function checkWon() {
         for (var i=0; i<field.rows*field.columns; i++) {
             var item = field.itemAtIndex(i);
             if( !item.revealed && !item.flagged )
-                item.flagged = true;
+                item.cellState = (item.cellState+1)%3;
         }
         // now all mines should be flagged, notify about this
         canvas.minesCountChanged(field.unrevealedMines, field.mines);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic