1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 20:07:35 +00:00

Hearts: Let the AI pick better lead cards

Instead of picking the card with the lowest value we should pick the
card with the highest value for which we know no lower value card is
in play anymore and that someone else still has an even higher value
card.
This commit is contained in:
Gunnar Beutner 2021-05-22 11:21:56 +02:00 committed by Linus Groh
parent c2a4b581fe
commit 1ae18c1228
4 changed files with 64 additions and 18 deletions

View file

@ -21,7 +21,7 @@ public:
{
}
size_t pick_low_points_low_value_card();
size_t pick_lead_card(Function<bool(Card&)>, Function<bool(Card&)>);
Optional<size_t> pick_low_points_high_value_card(Optional<Card::Type> type = {});
Optional<size_t> pick_lower_value_card(Card& other_card);
Optional<size_t> pick_slightly_higher_value_card(Card& other_card);