From 3ab8cfb7dc6170014d72a4903587ee99dd0ccb5b Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sat, 7 Dec 2024 12:34:11 +0100 Subject: [PATCH] Clean up GameState constructor --- src/gamestate.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/gamestate.cpp b/src/gamestate.cpp index 5912a85..13e56e4 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp @@ -1,19 +1,15 @@ #include "gamestate.h" #include #include +#include #include #include -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() {