catch games where specified draw pile is not feasible

This commit is contained in:
Maximilian Keßler 2023-11-11 07:58:10 +01:00
parent 8f6d8c68fe
commit 7eb1364e36
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -24,6 +24,10 @@ namespace Hanabi {
} }
game.forward_until(turn, draw_pile_size); game.forward_until(turn, draw_pile_size);
if (draw_pile_size != 0 and game.state->draw_pile_size() != static_cast<size_t>(draw_pile_size)) {
std::cout << "This given draw pile size (" << draw_pile_size << ") cannot be obtained with the specified replay." << std::endl;
return;
}
game.state->modify_clues(clue_modifier); game.state->modify_clues(clue_modifier);
if (not quiet) { if (not quiet) {