Add a destructor

This commit is contained in:
ItsDrike 2024-12-06 16:59:54 +01:00
parent 135d16daae
commit 5da97d7c0e
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 6 additions and 0 deletions

View file

@ -16,6 +16,11 @@ GameState::GameState(QObject* parent, bool preDealCards) : QObject{parent} {
} }
} }
GameState::~GameState() {
qDebug() << "Destroying GameState";
cleanupBoard(false);
}
void GameState::dealCards() { void GameState::dealCards() {
qDebug() << "Dealing cards"; qDebug() << "Dealing cards";
cleanupBoard(false); cleanupBoard(false);

View file

@ -20,6 +20,7 @@ class GameState : public QObject {
public: public:
explicit GameState(QObject* parent = nullptr, bool preDealCards = true); explicit GameState(QObject* parent = nullptr, bool preDealCards = true);
~GameState();
// Getters // Getters
QVariantList drawPile() const; QVariantList drawPile() const;