Clean up GameState constructor
This commit is contained in:
parent
fdc3405366
commit
3ab8cfb7dc
|
@ -1,19 +1,15 @@
|
|||
#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() {
|
||||
|
|
Loading…
Reference in a new issue