Diffstat (limited to 'noncore/games/solitaire/patiencecardgame.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/solitaire/patiencecardgame.cpp | 14 |
1 files changed, 9 insertions, 5 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 @@ -19,2 +19,3 @@ **********************************************************************/ + #include "patiencecardgame.h" @@ -119,5 +120,7 @@ void PatienceCardGame::readConfig( Config& cfg ) - deckTurns = cfg.readNumEntry("DeckTurns", 2500); + // todo: make this eventually configurable + deckTurns = cfg.readNumEntry("DeckTurns", 2); // Do we have a config file to read in? - if ( !cfg.hasKey("numberOfTimesThroughDeck") ) { + if ( !cfg.hasKey("numberOfTimesThroughDeck") ) + { // if not, create a new game @@ -278,4 +281,4 @@ void PatienceCardGame::mousePress(QPoint p) - -bool PatienceCardGame::canTurnOverDeck() { +bool PatienceCardGame::canTurnOverDeck() +{ return (numberOfTimesThroughDeck != deckTurns); @@ -283,3 +286,4 @@ bool PatienceCardGame::canTurnOverDeck() { -void PatienceCardGame::throughDeck() { +void PatienceCardGame::throughDeck() +{ numberOfTimesThroughDeck++; |