diff --git a/src/game/GameState.h b/src/game/GameState.h index 394721a..983ac96 100644 --- a/src/game/GameState.h +++ b/src/game/GameState.h @@ -256,9 +256,14 @@ namespace UNO::GAME { template void GameState::updateStateByDraw() { - if (this->drawCount_ != 0) { - this->drawCount_ = 0; + if (this->drawCount_ == 0) { + this->currentPlayer_->setRemainingCardCount(this->currentPlayer_->getRemainingCardCount() + 1); } + else { + this->currentPlayer_->setRemainingCardCount((this->currentPlayer_->getRemainingCardCount() + this->drawCount_)); + } + this->drawCount_ = 0; + this->nextPlayer(); } class ClientGameState final : public GameState {