bugfix: parse score goal

Boost parses uint8_t as chars, not as numbers,
so 'unsigned int' is used for parsing instead.
This commit is contained in:
Maximilian Keßler 2024-06-05 17:34:45 +02:00
parent 90f27bb26d
commit 2388c57d5e
Signed by: max
GPG key ID: BCC5A619923C0BA5
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ namespace Hanabi
* to be winning.
* If std::nullopt, then the maximum score of the game will be used.
*/
boost::optional<uint8_t> score_goal{};
boost::optional<unsigned int> score_goal{};
/**
* Whether game_state_spec denotes a turn number or draw pile size.

View file

@ -242,7 +242,7 @@ namespace Hanabi
"Turn 1 means no actions have been taken. ")
("draw-pile-size,d", bpo::value<unsigned>(&parms.game_state_spec), "Draw pile size of state to analyze.")
("score-goal,s"
, bpo::value<boost::optional<uint8_t>>(&parms.score_goal)
, bpo::value<boost::optional<unsigned int>>(&parms.score_goal)
, "Score that counts as a win, i.e. is optimized for achieving. If unspecified, the maximum possible "
"score will be used.")
("clue-modifier,c", bpo::value<int>(), "Optional relative modification to the number of clues applied to "