summaryrefslogtreecommitdiff
path: root/noncore
authortille <tille>2002-07-10 13:58:19 (UTC)
committer tille <tille>2002-07-10 13:58:19 (UTC)
commit6fefe6d5f0b7721e8f692ad8759666f3c50cd437 (patch) (unidiff)
treefa55166dba5b4366479a9c96c9efcc35a4ab7a02 /noncore
parentdcf25882f9093a34571454ec7bb2ecb821575498 (diff)
downloadopie-6fefe6d5f0b7721e8f692ad8759666f3c50cd437.zip
opie-6fefe6d5f0b7721e8f692ad8759666f3c50cd437.tar.gz
opie-6fefe6d5f0b7721e8f692ad8759666f3c50cd437.tar.bz2
tr(comments)
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/solitaire/canvascardgame.cpp4
-rw-r--r--noncore/games/solitaire/chicanecardgame.cpp8
-rw-r--r--noncore/games/solitaire/chicanecardgame.h17
-rw-r--r--noncore/games/solitaire/harpcardgame.cpp10
-rw-r--r--noncore/games/solitaire/harpcardgame.h18
-rw-r--r--noncore/games/solitaire/teeclubcardgame.cpp12
-rw-r--r--noncore/games/solitaire/teeclubcardgame.h27
7 files changed, 74 insertions, 22 deletions
diff --git a/noncore/games/solitaire/canvascardgame.cpp b/noncore/games/solitaire/canvascardgame.cpp
index 4404b04..8e07cc8 100644
--- a/noncore/games/solitaire/canvascardgame.cpp
+++ b/noncore/games/solitaire/canvascardgame.cpp
@@ -376,6 +376,6 @@ void CanvasCardGame::readPile( Config& cfg, CardPile *pile, QString name, int& h
376 card = cards[ val ]; 376 card = cards[ val ];
377 card->setFace(facing); 377 card->setFace(facing);
378 card->setCardPile(pile); // cam: setCardPile muss vor addCardToTop passieren 378 card->setCardPile(pile); // cam: setCardPile has to happen bevor addCardToTop
379 pile->addCardToTop(card); // weil sonst absturz wg cardAddedToTop 379 pile->addCardToTop(card); // due to a empty pointer if you use cardAddedToTop
380 QPoint p = pile->getCardPos( card ); 380 QPoint p = pile->getCardPos( card );
381 card->setPos( p.x(), p.y(), highestZ ); 381 card->setPos( p.x(), p.y(), highestZ );
diff --git a/noncore/games/solitaire/chicanecardgame.cpp b/noncore/games/solitaire/chicanecardgame.cpp
index a242419..6729a94 100644
--- a/noncore/games/solitaire/chicanecardgame.cpp
+++ b/noncore/games/solitaire/chicanecardgame.cpp
@@ -18,5 +18,11 @@
18** 18**
19** 19**
20** Modified by C.A.Mader 2002 20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game:
22 **use 2 decks = 104 cards
23 **deal 8 rows with 3 hidden cards and one open card
24** append red to black and vice versa
25 **each card can be layed on a free place
26 **deal 8 cards at once
21** 27**
22**********************************************************************/ 28**********************************************************************/
diff --git a/noncore/games/solitaire/chicanecardgame.h b/noncore/games/solitaire/chicanecardgame.h
index 668f5f4..f6bd08e 100644
--- a/noncore/games/solitaire/chicanecardgame.h
+++ b/noncore/games/solitaire/chicanecardgame.h
@@ -17,4 +17,13 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**
20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game:
22** use 2 decks = 104 cards
23** deal 8 rows with 3 hidden cards and one open card
24** append red to black and vice versa
25** each card can be layed on a free place
26** deal 8 cards at once
27**
19**********************************************************************/ 28**********************************************************************/
20#ifndef CHICANE_CARD_GAME_H 29#ifndef CHICANE_CARD_GAME_H
@@ -51,6 +60,6 @@ public:
51 virtual bool isAllowedOnTop(Card *card) { 60 virtual bool isAllowedOnTop(Card *card) {
52 if ( card->isFacing() && 61 if ( card->isFacing() &&
53 // ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // diese Zeile sorgt dafür dass nur Kings auf leere Plätze dürfen 62 // ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // only kings are allowed on empty places
54 ( (cardOnTop() == NULL) || // auf einen Freiplatz darf alles! 63 ( (cardOnTop() == NULL) || // each card can use an empty place
55 ( (cardOnTop() != NULL) && 64 ( (cardOnTop() != NULL) &&
56 ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) && 65 ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) &&
@@ -93,5 +102,5 @@ public:
93 // correct the position taking in to account the card is not 102 // correct the position taking in to account the card is not
94 // yet flipped, but will become flipped 103 // yet flipped, but will become flipped
95 top = QPoint( top.x(), top.y() - 3 ); // Keine Verschiebung! 104 top = QPoint( top.x(), top.y() - 3 ); // no moving to the side
96 newTopCard->flipTo( top.x(), top.y() ); 105 newTopCard->flipTo( top.x(), top.y() );
97 top = QPoint( top.x(), top.y() + offsetDown ); 106 top = QPoint( top.x(), top.y() + offsetDown );
@@ -109,5 +118,5 @@ public:
109 y += offsetDown; 118 y += offsetDown;
110 } else { 119 } else {
111 x += 0; // Keine Verschiebung! 120 x += 0; // no moving to the side
112 y += 3; 121 y += 3;
113 } 122 }
diff --git a/noncore/games/solitaire/harpcardgame.cpp b/noncore/games/solitaire/harpcardgame.cpp
index 22715ec..0711622 100644
--- a/noncore/games/solitaire/harpcardgame.cpp
+++ b/noncore/games/solitaire/harpcardgame.cpp
@@ -18,5 +18,13 @@
18** 18**
19** 19**
20** Modified by C.A.Mader 2002 20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game:
22** use 2 decks = 104 cards
23** deal 8 rows with one open card in the first place
24** one hidden and one open in the second place and so on
25** append red to black and vice versa
26** each card can be layed on a free place
27** deal 8 cards at once
28**
21** 29**
22**********************************************************************/ 30**********************************************************************/
diff --git a/noncore/games/solitaire/harpcardgame.h b/noncore/games/solitaire/harpcardgame.h
index d1733fd..18b95e3 100644
--- a/noncore/games/solitaire/harpcardgame.h
+++ b/noncore/games/solitaire/harpcardgame.h
@@ -17,4 +17,14 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**
20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game:
22** use 2 decks = 104 cards
23** deal 8 rows with one open card in the first place
24 **one hidden and one open in the second place and so on
25** append red to black and vice versa
26** each card can be layed on a free place
27** deal 8 cards at once
28**
19**********************************************************************/ 29**********************************************************************/
20#ifndef HARP_CARD_GAME_H 30#ifndef HARP_CARD_GAME_H
@@ -51,6 +61,6 @@ public:
51 virtual bool isAllowedOnTop(Card *card) { 61 virtual bool isAllowedOnTop(Card *card) {
52 if ( card->isFacing() && 62 if ( card->isFacing() &&
53 // ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // diese Zeile sorgt dafür dass nur Kings auf leere Plätze dürfen 63 // ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // only kings are allowed on empty places
54 ( (cardOnTop() == NULL) || // auf einen Freiplatz darf alles! 64 ( (cardOnTop() == NULL) || // aeach card can use an emply place
55 ( (cardOnTop() != NULL) && 65 ( (cardOnTop() != NULL) &&
56 ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) && 66 ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) &&
@@ -93,5 +103,5 @@ public:
93 // correct the position taking in to account the card is not 103 // correct the position taking in to account the card is not
94 // yet flipped, but will become flipped 104 // yet flipped, but will become flipped
95 top = QPoint( top.x(), top.y() - 3 ); // Keine Verschiebung! 105 top = QPoint( top.x(), top.y() - 3 ); // no moving to the side
96 newTopCard->flipTo( top.x(), top.y() ); 106 newTopCard->flipTo( top.x(), top.y() );
97 top = QPoint( top.x(), top.y() + offsetDown ); 107 top = QPoint( top.x(), top.y() + offsetDown );
@@ -109,5 +119,5 @@ public:
109 y += offsetDown; 119 y += offsetDown;
110 } else { 120 } else {
111 x += 0; // Keine Verschiebung! 121 x += 0; // no moving to the side
112 y += 3; 122 y += 3;
113 } 123 }
diff --git a/noncore/games/solitaire/teeclubcardgame.cpp b/noncore/games/solitaire/teeclubcardgame.cpp
index e15da96..0941e0d 100644
--- a/noncore/games/solitaire/teeclubcardgame.cpp
+++ b/noncore/games/solitaire/teeclubcardgame.cpp
@@ -18,5 +18,13 @@
18** 18**
19** 19**
20** Modified by C.A.Mader 2002 20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game:
22** use 2 decks = 104 cards
23** deal 9 rows with 5 open cards each
24** append one card to each other card which is one step higher
25** move only columns of cards which are equal in suit
26** each card can be layed on a free place
27** deal 1 card at once on the first pile
28**
21** 29**
22**********************************************************************/ 30**********************************************************************/
@@ -85,5 +93,5 @@ void TeeclubCardGame::resizePiles()
85 for (int i = 0; i < 9; i++) { 93 for (int i = 0; i < 9; i++) {
86 while ((workingPiles[i]->getCardPos(NULL).y() > 230) && (workingPiles[i]->getOffsetDown()>1)) { 94 while ((workingPiles[i]->getCardPos(NULL).y() > 230) && (workingPiles[i]->getOffsetDown()>1)) {
87 // Resizen des Stapels 95 // resize the pile
88 workingPiles[i]->setOffsetDown(workingPiles[i]->getOffsetDown()-1); 96 workingPiles[i]->setOffsetDown(workingPiles[i]->getOffsetDown()-1);
89 Card *card = workingPiles[i]->cardOnBottom(); 97 Card *card = workingPiles[i]->cardOnBottom();
diff --git a/noncore/games/solitaire/teeclubcardgame.h b/noncore/games/solitaire/teeclubcardgame.h
index 06d49f8..25cfaf9 100644
--- a/noncore/games/solitaire/teeclubcardgame.h
+++ b/noncore/games/solitaire/teeclubcardgame.h
@@ -17,4 +17,15 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**
20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game:
22** use 2 decks = 104 cards
23** deal 9 rows with 5 open cards each
24** append one card to each other card which is one step higher
25 **move only columns of cards which are equal in suit
26** each card can be layed on a free place
27** deal 1 card at once on the first pile
28**
29**
19**********************************************************************/ 30**********************************************************************/
20#ifndef TEECLUB_CARD_GAME_H 31#ifndef TEECLUB_CARD_GAME_H
@@ -50,5 +61,5 @@ public:
50 virtual bool isAllowedToBeMoved(Card *card) { 61 virtual bool isAllowedToBeMoved(Card *card) {
51 if (card->isFacing()) return FALSE; 62 if (card->isFacing()) return FALSE;
52 return FALSE; // die Toten ruhn 63 return FALSE; // the deads are sleeping forever
53 } 64 }
54}; 65};
@@ -63,8 +74,8 @@ public:
63 virtual bool isAllowedOnTop(Card *card) { 74 virtual bool isAllowedOnTop(Card *card) {
64 if ( card->isFacing() && 75 if ( card->isFacing() &&
65 // ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // diese Zeile sorgt dafür dass nur Kings auf leere Plätze dürfen 76 // ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // use this if only Kings are allowed on empty places
66 ( (cardOnTop() == NULL) || // auf einen Freiplatz darf alles! 77 ( (cardOnTop() == NULL) || // each card can use an empty place
67 ( (cardOnTop() != NULL) && 78 ( (cardOnTop() != NULL) &&
68 ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) // bei teeclub sind die farben zum Anlegen egal 79 ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) // you can append every color on every color
69 ) ) ) 80 ) ) )
70 return TRUE; 81 return TRUE;
@@ -106,5 +117,5 @@ public:
106 // correct the position taking in to account the card is not 117 // correct the position taking in to account the card is not
107 // yet flipped, but will become flipped 118 // yet flipped, but will become flipped
108 top = QPoint( top.x(), top.y() - 3 ); // Keine seitliche Verschiebung! 119 top = QPoint( top.x(), top.y() - 3 ); // no moving to the side
109 newTopCard->flipTo( top.x(), top.y() ); 120 newTopCard->flipTo( top.x(), top.y() );
110 top = QPoint( top.x(), top.y() + offsetDown ); 121 top = QPoint( top.x(), top.y() + offsetDown );
@@ -115,5 +126,5 @@ public:
115 126
116 if ((getCardPos(NULL).y() < 230) && (getOffsetDown()<13)) { 127 if ((getCardPos(NULL).y() < 230) && (getOffsetDown()<13)) {
117 // Resizen des Stapels 128 // resize the pile
118 beginDealing(); 129 beginDealing();
119 setOffsetDown(getOffsetDown()+1); 130 setOffsetDown(getOffsetDown()+1);
@@ -137,5 +148,5 @@ public:
137 y += offsetDown; 148 y += offsetDown;
138 } else { 149 } else {
139 x += 0; // Keine seitliche Verschiebung! 150 x += 0; // no moving to the side
140 y += 3; 151 y += 3;
141 } 152 }
@@ -155,5 +166,5 @@ public:
155 166
156 while (isPileResize() && (getCardPos(NULL).y() > 230) && (getOffsetDown()>1)) { 167 while (isPileResize() && (getCardPos(NULL).y() > 230) && (getOffsetDown()>1)) {
157 // Resizen des Stapels 168 // resize the pile
158 beginDealing(); 169 beginDealing();
159 setOffsetDown(getOffsetDown()-1); 170 setOffsetDown(getOffsetDown()-1);