summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/solitaire/patiencecardgame.cpp13
-rw-r--r--noncore/games/solitaire/patiencecardgame.h31
2 files changed, 25 insertions, 19 deletions
diff --git a/noncore/games/solitaire/patiencecardgame.cpp b/noncore/games/solitaire/patiencecardgame.cpp
index 756577a..a1e4968 100644
--- a/noncore/games/solitaire/patiencecardgame.cpp
+++ b/noncore/games/solitaire/patiencecardgame.cpp
@@ -119,5 +119,5 @@ void PatienceCardGame::readConfig( Config& cfg )
119 119
120 deckTurns = cfg.readNumEntry("DeckTurns", 2500);
120 // Do we have a config file to read in? 121 // Do we have a config file to read in?
121 if ( !cfg.hasKey("numberOfTimesThroughDeck") ) 122 if ( !cfg.hasKey("numberOfTimesThroughDeck") ) {
122 {
123 // if not, create a new game 123 // if not, create a new game
@@ -279 +279,10 @@ void PatienceCardGame::mousePress(QPoint p)
279 279
280bool PatienceCardGame::canTurnOverDeck() {
281 return (numberOfTimesThroughDeck != deckTurns);
282}
283
284void PatienceCardGame::throughDeck() {
285 numberOfTimesThroughDeck++;
286 if (numberOfTimesThroughDeck == deckTurns)
287 circleCross->setCross();
288 }
diff --git a/noncore/games/solitaire/patiencecardgame.h b/noncore/games/solitaire/patiencecardgame.h
index 0d0e3d5..b76251a 100644
--- a/noncore/games/solitaire/patiencecardgame.h
+++ b/noncore/games/solitaire/patiencecardgame.h
@@ -20,3 +20,3 @@
20#ifndef PATIENCE_CARD_GAME_H 20#ifndef PATIENCE_CARD_GAME_H
21#define PATIENCE_CARD_GAME_H 21#define PATIENCE_CARD_GAME_H
22 22
@@ -48,3 +48,3 @@ public:
48 return TRUE; 48 return TRUE;
49 return FALSE; 49 return FALSE;
50 } 50 }
@@ -68,3 +68,3 @@ public:
68 return TRUE; 68 return TRUE;
69 return FALSE; 69 return FALSE;
70 } 70 }
@@ -85,3 +85,3 @@ public:
85 return TRUE; 85 return TRUE;
86 return FALSE; 86 return FALSE;
87 } 87 }
@@ -90,3 +90,3 @@ public:
90 return TRUE; 90 return TRUE;
91 return FALSE; 91 return FALSE;
92 } 92 }
@@ -107,3 +107,3 @@ public:
107 return TRUE; 107 return TRUE;
108 return FALSE; 108 return FALSE;
109 } 109 }
@@ -112,3 +112,3 @@ public:
112 return TRUE; 112 return TRUE;
113 return FALSE; 113 return FALSE;
114 } 114 }
@@ -150,8 +150,8 @@ public:
150 int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13; 150 int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13;
151 y += offsetDown; 151 y += offsetDown;
152 } else { 152 } else {
153 x += 1; 153 x += 1;
154 y += 3; 154 y += 3;
155 } 155 }
156 card = cardInfront(card); 156 card = cardInfront(card);
157 } 157 }
@@ -175,3 +175,4 @@ public:
175 virtual void deal(void); 175 virtual void deal(void);
176 virtual bool haveWeWon() { 176 int deckTurns;
177 virtual bool haveWeWon() {
177 return ( discardPiles[0]->kingOnTop() && 178 return ( discardPiles[0]->kingOnTop() &&
@@ -187,8 +188,4 @@ public:
187// virtual void mouseMoveCard(Card *card, QPoint p) { Q_UNUSED(card); Q_UNUSED(p); } 188// virtual void mouseMoveCard(Card *card, QPoint p) { Q_UNUSED(card); Q_UNUSED(p); }
188 bool canTurnOverDeck(void) { return (numberOfTimesThroughDeck != 3); } 189 bool canTurnOverDeck();
189 void throughDeck(void) { 190 void throughDeck();
190 numberOfTimesThroughDeck++;
191 if (numberOfTimesThroughDeck == 3)
192 circleCross->setCross();
193 }
194 bool snapOn; 191 bool snapOn;