summaryrefslogtreecommitdiff
path: root/noncore
authorar <ar>2004-06-03 21:13:20 (UTC)
committer ar <ar>2004-06-03 21:13:20 (UTC)
commit9f12abfa6b60232592aa15feea25bee28908f525 (patch) (side-by-side diff)
treeaf16be15cd597cdf01d8476f478f3bbe7dc81509 /noncore
parent52f849d3031f9d2fad2272ad069e7a1456c0ee54 (diff)
downloadopie-9f12abfa6b60232592aa15feea25bee28908f525.zip
opie-9f12abfa6b60232592aa15feea25bee28908f525.tar.gz
opie-9f12abfa6b60232592aa15feea25bee28908f525.tar.bz2
- turn on casino rules in solitare (make it eventually configurable)
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/solitaire/patiencecardgame.cpp26
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
@@ -17,6 +17,7 @@
** not clear to you.
**
**********************************************************************/
+
#include "patiencecardgame.h"
@@ -117,9 +118,11 @@ void PatienceCardGame::readConfig( Config& cfg )
{
cfg.setGroup("GameState");
- 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
newGame();
return;
@@ -211,7 +214,7 @@ bool PatienceCardGame::mousePressCard( Card *card, QPoint p )
else
item->flipTo( 35, (int)item->y() );
}
- else return FALSE; // <- was missing, caused facedown card to react
+ else return FALSE; // <- was missing, caused facedown card to react
// to clicking, which is wrong
moving = NULL;
moved = FALSE;
@@ -276,13 +279,14 @@ void PatienceCardGame::mousePress(QPoint p)
}
}
-
-bool PatienceCardGame::canTurnOverDeck() {
- return (numberOfTimesThroughDeck != deckTurns);
+bool PatienceCardGame::canTurnOverDeck()
+{
+ return (numberOfTimesThroughDeck != deckTurns);
}
-void PatienceCardGame::throughDeck() {
- numberOfTimesThroughDeck++;
- if (numberOfTimesThroughDeck == deckTurns)
- circleCross->setCross();
- }
+void PatienceCardGame::throughDeck()
+{
+ numberOfTimesThroughDeck++;
+ if (numberOfTimesThroughDeck == deckTurns)
+ circleCross->setCross();
+}