diff --git a/gamestate.cpp b/gamestate.cpp index 53efc18..e0a9764 100644 --- a/gamestate.cpp +++ b/gamestate.cpp @@ -448,13 +448,14 @@ bool GameState::isColumnMoveValid(const PlayingCard& cardToMove, int columnId) { void GameState::ensureColumnRevealed(int columnId) { assert(columnId >= 0 && columnId < 7); + auto& columnStack = m_columns[columnId]; // Nothing to reveal if (m_columns[columnId].isEmpty()) return; // Get the last column slot - ColumnSlot *col = m_columns[columnId].last(); + ColumnSlot *col = columnStack.last(); // If it's already revealed, there's nothing to do if (col->isRevealed()) @@ -462,6 +463,7 @@ void GameState::ensureColumnRevealed(int columnId) // First slot in the column must always be revealed, reveal it col->reveal(); + qDebug() << "Revealed card " << col->card()->toString() << " in column " << columnId; } QList GameState::drawPile() const