Card *Fortyeight::newCards() { if (Deck::deck()->isEmpty() && lastdeal) return 0; if (pile->top() && pile->top()->animated()) return pile->top(); if (Deck::deck()->isEmpty()) { lastdeal = true; while (!pile->isEmpty()) { Card *c = pile->at(pile->cardsLeft()-1); c->stopAnimation(); Deck::deck()->add(c, true); } } Card *c = Deck::deck()->nextCard(); pile->add(c, true); c->stopAnimation(); qreal x = c->realX(); qreal y = c->realY(); c->setPos( Deck::deck()->pos() ); c->flipTo(x, y, DURATION_FLIP ); takeState(); considerGameStarted(); if ( Deck::deck()->isEmpty() && lastdeal ) emit newCardsPossible( false ); return c; }
Card *Gypsy::newCards() { if (Deck::deck()->isEmpty()) return 0; unmarkAll(); dealRow(true); takeState(); considerGameStarted(); if (Deck::deck()->isEmpty()) emit newCardsPossible(false); return store[0]->top(); }
bool Grandf::newCards() { if ( numberOfDeals >= 3 ) return false; // NOTE: This is not quite correct. The piles should be turned face down // (i.e. partially reversed) during collection. QList<KCard*> collectedCards; for ( int pos = 6; pos >= 0; --pos ) { collectedCards << store[pos]->cards(); store[pos]->clear(); } deal( collectedCards ); takeState(); numberOfDeals++; if (numberOfDeals == 3) emit newCardsPossible(false); return true; }
void Gypsy::deal() { dealRow(false); dealRow(false); dealRow(true); takeState(); }