Adjust setupWinningDeck to make a bit harder deck
This commit is contained in:
parent
5a2e7d5465
commit
098b45a3ff
|
@ -71,7 +71,7 @@ void GameState::setupWinningDeck() {
|
|||
// Setup the foundation with all cards except one per suit
|
||||
for (int suit = 0; suit < 4; ++suit) {
|
||||
QList<PlayingCard*> foundationPile;
|
||||
for (int rank = 1; rank <= 12; ++rank) { // Leave the King (rank 13) out
|
||||
for (int rank = 1; rank <= 11; ++rank) { // Leave the Queens & Kings (rank 2 & 13) out
|
||||
foundationPile.prepend(deck[suit * 13 + rank - 1]);
|
||||
}
|
||||
m_foundation[suit] = foundationPile;
|
||||
|
@ -81,11 +81,22 @@ void GameState::setupWinningDeck() {
|
|||
for (int i = 0; i < 4; ++i) {
|
||||
QList<ColumnSlot*> column;
|
||||
PlayingCard* kingCard = deck[i * 13 + 12]; // King of each suit
|
||||
ColumnSlot* slot = new ColumnSlot(kingCard, true, this); // Revealed
|
||||
ColumnSlot* slot = new ColumnSlot(kingCard, i == 3, this); // Not revealed, except last
|
||||
column.append(slot);
|
||||
m_columns[i] = column;
|
||||
}
|
||||
|
||||
// Three of the remaining four Queens are placed over the Kings
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
int queenSuit = (i + 2) % 4; // Opposite suit cyclically
|
||||
PlayingCard* kingCard = deck[queenSuit * 13 + 11]; // Queen of each suit
|
||||
ColumnSlot* slot = new ColumnSlot(kingCard, true, this); // Revealed
|
||||
m_columns[i].append(slot);
|
||||
}
|
||||
|
||||
// Place the final Queen in the draw pile
|
||||
m_drawPile.append(deck[1 * 13 + 11]);
|
||||
|
||||
emit drawPileChanged();
|
||||
emit throwawayPileChanged();
|
||||
emit columnsChanged();
|
||||
|
|
Loading…
Reference in a new issue