mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
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:
parent
2b2d992946
commit
4a8d8da46c
Notes:
sideshowbarker
2024-07-18 17:05:25 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/4a8d8da46c6 Pull-request: https://github.com/SerenityOS/serenity/pull/7648
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue