Add a destructor
This commit is contained in:
parent
135d16daae
commit
5da97d7c0e
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue