diff --git a/include/download.h b/include/download.h index cd5aa62..cdb82bb 100644 --- a/include/download.h +++ b/include/download.h @@ -20,7 +20,7 @@ namespace Download { struct Action { Hanabi::ActionType type{}; - uint8_t target{}; + int8_t target{}; }; Action tag_invoke(boost::json::value_to_tag, boost::json::value const &jv); diff --git a/include/game_state.h b/include/game_state.h index 58e02fa..01c07bc 100644 --- a/include/game_state.h +++ b/include/game_state.h @@ -170,6 +170,7 @@ enum class ActionType : std::uint8_t { color_clue = 2, rank_clue = 3, end_game = 4, + vote_terminate_players = 5, vote_terminate = 10, }; diff --git a/src/download.cpp b/src/download.cpp index c9a1a5f..1187a0e 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -44,6 +44,7 @@ namespace Download { action.type = Hanabi::ActionType::clue; break; case Hanabi::ActionType::end_game: + case Hanabi::ActionType::vote_terminate_players: case Hanabi::ActionType::vote_terminate: action.type = Hanabi::ActionType::end_game; break; @@ -122,6 +123,7 @@ namespace Download { ASSERT(index != std::uint8_t(-1)); game->play(index); break; + case Hanabi::ActionType::vote_terminate_players: case Hanabi::ActionType::vote_terminate: case Hanabi::ActionType::end_game: return game;