From 408457e7cec9fd8d8affdcf47bcf28ad997d9d8d Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 3 Dec 2024 01:50:52 +0100 Subject: [PATCH] Log warnings in certain unexpected branches --- gamestate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gamestate.cpp b/gamestate.cpp index 0446936..6a3aa2b 100644 --- a/gamestate.cpp +++ b/gamestate.cpp @@ -78,7 +78,7 @@ bool GameState::moveCardToColumn(int columnId) assert(columnId >= 0 && columnId < 7); if (m_throwawayPile.isEmpty()) { - // Consider raising an exception here instead + qWarning() << "Attempted to move thrown card to column with empty throwaway pile"; return false; } @@ -123,7 +123,7 @@ bool GameState::moveCardToColumn(int columnId) bool GameState::moveThrownCardToFoundation(PlayingCard::Suit foundationId) { if (m_throwawayPile.isEmpty()) { - // Consider raising an exception here instead + qWarning() << "Attempted to move thrown card to foundation with empty throwaway pile"; return false; } @@ -147,7 +147,7 @@ bool GameState::moveColumnCardToFoundation(int columnId, PlayingCard::Suit found assert(columnId >= 0 && columnId < 7); if (m_columns[columnId].isEmpty()) { - // Consider raising an exception here instead + qWarning() << "Attempted to move card to foundation from an empty column"; return false; }