Hearts: Make debugging AI suggestions easier

When building Hearts with HEARTS_DEBUG we highlight the card the AI
would have picked. This makes comparing AI and human decisions easier.
This commit is contained in:
Gunnar Beutner 2021-06-01 00:06:16 +02:00 committed by Andreas Kling
parent 2b2d992946
commit 4a8d8da46c
Notes: sideshowbarker 2024-07-18 17:05:25 +09:00

View file

@ -397,6 +397,11 @@ void Game::let_player_play_card()
if (player.is_human) {
m_human_can_play = true;
if constexpr (HEARTS_DEBUG) {
auto card_index = pick_card(player);
auto& card = player.hand[card_index];
card->set_inverted(true);
}
update();
return;
}