mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 20:47:45 +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:
parent
c2a4b581fe
commit
1ae18c1228
4 changed files with 64 additions and 18 deletions
|
@ -45,6 +45,8 @@ private:
|
|||
Player& current_player();
|
||||
bool game_ended() const { return m_trick_number == 13; }
|
||||
bool is_winner(Player& player);
|
||||
bool other_player_has_lower_value_card(Player& player, Card& card);
|
||||
bool other_player_has_higher_value_card(Player& player, Card& card);
|
||||
|
||||
void start_animation(NonnullRefPtrVector<Card> cards, Gfx::IntPoint const& end, Function<void()> did_finish_callback, int initial_delay_ms, int steps = 30);
|
||||
void stop_animation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue