-rw-r--r-- | noncore/games/solitaire/patiencecardgame.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/noncore/games/solitaire/patiencecardgame.cpp b/noncore/games/solitaire/patiencecardgame.cpp index a1e4968..00448ad 100644 --- a/noncore/games/solitaire/patiencecardgame.cpp +++ b/noncore/games/solitaire/patiencecardgame.cpp | |||
@@ -18,4 +18,5 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
20 | #include "patiencecardgame.h" | 21 | #include "patiencecardgame.h" |
21 | 22 | ||
@@ -118,7 +119,9 @@ void PatienceCardGame::readConfig( Config& cfg ) | |||
118 | cfg.setGroup("GameState"); | 119 | cfg.setGroup("GameState"); |
119 | 120 | ||
120 | deckTurns = cfg.readNumEntry("DeckTurns", 2500); | 121 | // todo: make this eventually configurable |
122 | deckTurns = cfg.readNumEntry("DeckTurns", 2); | ||
121 | // Do we have a config file to read in? | 123 | // Do we have a config file to read in? |
122 | if ( !cfg.hasKey("numberOfTimesThroughDeck") ) { | 124 | if ( !cfg.hasKey("numberOfTimesThroughDeck") ) |
125 | { | ||
123 | // if not, create a new game | 126 | // if not, create a new game |
124 | newGame(); | 127 | newGame(); |
@@ -212,5 +215,5 @@ bool PatienceCardGame::mousePressCard( Card *card, QPoint p ) | |||
212 | item->flipTo( 35, (int)item->y() ); | 215 | item->flipTo( 35, (int)item->y() ); |
213 | } | 216 | } |
214 | else return FALSE; // <- was missing, caused facedown card to react | 217 | else return FALSE; // <- was missing, caused facedown card to react |
215 | // to clicking, which is wrong | 218 | // to clicking, which is wrong |
216 | moving = NULL; | 219 | moving = NULL; |
@@ -277,12 +280,13 @@ void PatienceCardGame::mousePress(QPoint p) | |||
277 | } | 280 | } |
278 | 281 | ||
279 | 282 | bool PatienceCardGame::canTurnOverDeck() | |
280 | bool PatienceCardGame::canTurnOverDeck() { | 283 | { |
281 | return (numberOfTimesThroughDeck != deckTurns); | 284 | return (numberOfTimesThroughDeck != deckTurns); |
282 | } | 285 | } |
283 | 286 | ||
284 | void PatienceCardGame::throughDeck() { | 287 | void PatienceCardGame::throughDeck() |
285 | numberOfTimesThroughDeck++; | 288 | { |
286 | if (numberOfTimesThroughDeck == deckTurns) | 289 | numberOfTimesThroughDeck++; |
287 | circleCross->setCross(); | 290 | if (numberOfTimesThroughDeck == deckTurns) |
288 | } | 291 | circleCross->setCross(); |
292 | } | ||