refactor(game): simplify GameState construction and initialization

- Removed `GameStatus` dependency from `GameState` constructors.
- Adjusted `ClientGameState` and `ServerGameState` constructors accordingly.
- Simplified `ServerGameState::init()` to handle card initialization and player actions.
- Updated tests to reflect these changes.
This commit is contained in:
Kieran Kihn
2025-12-02 11:08:42 +08:00
parent a650b61610
commit e5304b8c6c
3 changed files with 12 additions and 18 deletions

View File

@@ -13,7 +13,7 @@
TEST(game_state_test, game_state_test_1)
{
UNO::GAME::ClientGameState clientGameState(UNO::GAME::GameStatus::WAITING_PLAYERS_TO_NEXT_TURN, std::string("lzh"));
UNO::GAME::ClientGameState clientGameState(std::string("lzh"));
UNO::GAME::ClientPlayerState playerState1("pkq", 100, false);
UNO::GAME::ClientPlayerState playerState2("kpq", 100, false);