diff --git a/src/game/GameState.cpp b/src/game/GameState.cpp index 754ecfc..4335f35 100644 --- a/src/game/GameState.cpp +++ b/src/game/GameState.cpp @@ -66,7 +66,9 @@ namespace UNO::GAME { if (this->drawCount_ == 0) { this->drawCount_ = 1; } + this->currentPlayer_->setRemainingCardCount((this->currentPlayer_->getRemainingCardCount() + this->drawCount_)); this->currentPlayer_->draw(this->deck_.draw(this->drawCount_)); this->drawCount_ = 0; + this->nextPlayer(); } } // namespace UNO::GAME \ No newline at end of file diff --git a/src/game/GameState.h b/src/game/GameState.h index 57c6d64..3c05e30 100644 --- a/src/game/GameState.h +++ b/src/game/GameState.h @@ -266,11 +266,9 @@ namespace UNO::GAME { void GameState::updateStateByDraw() { if (this->drawCount_ == 0) { - this->currentPlayer_->setRemainingCardCount(this->currentPlayer_->getRemainingCardCount() + 1); - } - else { - this->currentPlayer_->setRemainingCardCount((this->currentPlayer_->getRemainingCardCount() + this->drawCount_)); + this->drawCount_ = 1; } + this->currentPlayer_->setRemainingCardCount((this->currentPlayer_->getRemainingCardCount() + this->drawCount_)); this->drawCount_ = 0; this->nextPlayer(); }