cli: treat currently played card as trash in draw selection
This commit is contained in:
parent
fdd59216f6
commit
f300c61c81
1 changed files with 2 additions and 1 deletions
|
@ -93,7 +93,8 @@ namespace Hanabi {
|
|||
unsigned num_trash = 0;
|
||||
std::optional<probability_t> trash_discard_prob = 0;
|
||||
for(const auto &[card_multiplicity, probability]: next_states) {
|
||||
if (game->is_trash(card_multiplicity.card)) {
|
||||
// If the card is played, we can treat it as a trash draw as well
|
||||
if (game->is_trash(card_multiplicity.card) or (play and game->cur_hand()[index] == card_multiplicity.card)) {
|
||||
num_trash += card_multiplicity.multiplicity;
|
||||
trash_discard_prob = probability;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue