author | tille <tille> | 2002-07-10 13:58:19 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-10 13:58:19 (UTC) |
commit | 6fefe6d5f0b7721e8f692ad8759666f3c50cd437 (patch) (side-by-side diff) | |
tree | fa55166dba5b4366479a9c96c9efcc35a4ab7a02 /noncore/games/solitaire/teeclubcardgame.h | |
parent | dcf25882f9093a34571454ec7bb2ecb821575498 (diff) | |
download | opie-6fefe6d5f0b7721e8f692ad8759666f3c50cd437.zip opie-6fefe6d5f0b7721e8f692ad8759666f3c50cd437.tar.gz opie-6fefe6d5f0b7721e8f692ad8759666f3c50cd437.tar.bz2 |
tr(comments)
Diffstat (limited to 'noncore/games/solitaire/teeclubcardgame.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/solitaire/teeclubcardgame.h | 27 |
1 files changed, 19 insertions, 8 deletions
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 @@ -16,6 +16,17 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** +** +** created on base of patiencecardgame by cam (C.A.Mader) 2002 +** Rules for this game: +** use 2 decks = 104 cards +** deal 9 rows with 5 open cards each +** append one card to each other card which is one step higher +** move only columns of cards which are equal in suit +** each card can be layed on a free place +** deal 1 card at once on the first pile +** +** **********************************************************************/ #ifndef TEECLUB_CARD_GAME_H #define TEECLUB_CARD_GAME_H @@ -49,7 +60,7 @@ public: } virtual bool isAllowedToBeMoved(Card *card) { if (card->isFacing()) return FALSE; - return FALSE; // die Toten ruhn + return FALSE; // the deads are sleeping forever } }; @@ -62,10 +73,10 @@ public: virtual bool isAllowedOnTop(Card *card) { if ( card->isFacing() && -// ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // diese Zeile sorgt dafür dass nur Kings auf leere Plätze dürfen - ( (cardOnTop() == NULL) || // auf einen Freiplatz darf alles! +// ( ( ( cardOnTop() == NULL ) && (card->getValue() == king) ) || // use this if only Kings are allowed on empty places + ( (cardOnTop() == NULL) || // each card can use an empty place ( (cardOnTop() != NULL) && - ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) // bei teeclub sind die farben zum Anlegen egal + ((int)card->getValue() + 1 == (int)cardOnTop()->getValue()) // you can append every color on every color ) ) ) return TRUE; return FALSE; @@ -105,7 +116,7 @@ public: int offsetDown = newTopCard->getCardPile()->getOffsetDown(); // correct the position taking in to account the card is not // yet flipped, but will become flipped - top = QPoint( top.x(), top.y() - 3 ); // Keine seitliche Verschiebung! + top = QPoint( top.x(), top.y() - 3 ); // no moving to the side newTopCard->flipTo( top.x(), top.y() ); top = QPoint( top.x(), top.y() + offsetDown ); } @@ -114,7 +125,7 @@ public: } if ((getCardPos(NULL).y() < 230) && (getOffsetDown()<13)) { - // Resizen des Stapels + // resize the pile beginDealing(); setOffsetDown(getOffsetDown()+1); Card *card = cardOnBottom(); @@ -136,7 +147,7 @@ public: int offsetDown = card->getCardPile()->getOffsetDown(); y += offsetDown; } else { - x += 0; // Keine seitliche Verschiebung! + x += 0; // no moving to the side y += 3; } card = cardInfront(card); @@ -154,7 +165,7 @@ public: setNextY( getCardPos(NULL).y() ); while (isPileResize() && (getCardPos(NULL).y() > 230) && (getOffsetDown()>1)) { - // Resizen des Stapels + // resize the pile beginDealing(); setOffsetDown(getOffsetDown()-1); Card *card = cardOnBottom(); |