Clean up GameState constructor

This commit is contained in:
ItsDrike 2024-12-07 12:34:11 +01:00
parent fdc3405366
commit 3ab8cfb7dc
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -1,20 +1,16 @@
#include "gamestate.h"
#include <QDebug>
#include <QSet>
#include <qlist.h>
#include <qqmllist.h>
#include <random>
GameState::GameState(QObject* parent, bool preDealCards) : QObject{parent} {
GameState::GameState(QObject* parent, bool preDealCards) : QObject{parent}, m_columns(7), m_foundation(4), m_gameWon(false) {
assert(connect(this, &GameState::foundationChanged, this, &GameState::onFoundationChanged));
m_foundation.resize(4);
m_columns.resize(7);
m_gameWon = false;
if (preDealCards) {
if (preDealCards)
dealCards();
}
}
GameState::~GameState() {
qDebug() << "Destroying GameState";