Gunnar Beutner
87ace131bc
Hearts: Add support for playing more than one hand
...
This changes the game so that more than one hand can be played. Once
one player has 100 or more points the game ends. A score card is shown
between each hand.
Fixes #7374 .
2021-05-25 21:05:35 +02:00
Gunnar Beutner
e636ed43eb
Hearts: Let the AI continuously play games
...
When there are no human players (toggled with Shift-F10) the AI will
continuously start new games when the current game has finished.
2021-05-25 21:05:35 +02:00
Gunnar Beutner
ac1eba2f7c
Hearts: Implement passing cards to other players
...
Fixes #7375 .
2021-05-25 21:05:35 +02:00
Gunnar Beutner
fab073f33c
Hearts: Move card click handler into a separate method
2021-05-25 21:05:35 +02:00
Gunnar Beutner
89d38b7e94
Hearts: Move sorting helper from Player::pick_lead_card into a method
2021-05-25 21:05:35 +02:00
Gunnar Beutner
4ba9cc82c0
Hearts: Move code to reposition cards into a separate method
2021-05-25 21:05:35 +02:00
Gunnar Beutner
9a6c6a98e5
Hearts: Move round initialization into a separate method
2021-05-25 21:05:35 +02:00
Gunnar Beutner
4e3a1f2da9
Hearts: Move hand sorting functionality into a method
2021-05-25 21:05:35 +02:00
Josh Perry
d27616cf36
Hearts: Allow player to set their name
...
Added a new settings dialog to Hearts with a textbox to allow the
player to set a name, which is persisted in the Hearts config file.
2021-05-23 20:43:53 +01:00
Gunnar Beutner
6a194869cf
Hearts: Add key combinations to letting the AI play for you
...
A single card can be played with F10 while Shift-F10 toggles the AI
for the current as well as all future tricks.
2021-05-23 18:15:36 +02:00
Gunnar Beutner
2dfced2501
Hearts: Let the AI prefer lead cards for which other cards are in play
...
When picking a lead card the AI should avoid playing cards where it
knows that no other player has a lower value card of the same type.
2021-05-23 18:15:36 +02:00
Gunnar Beutner
647d0f9f8a
Hearts: Fix sorting function for lead cards
...
The pick_lead_card() function sometimes picks the incorrect card
because the sorted_hand vector wasn't being sorted properly.
2021-05-23 18:15:36 +02:00
Gunnar Beutner
1ae18c1228
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.
2021-05-22 12:03:31 +01:00
Gunnar Beutner
c2a4b581fe
Hearts: Prefer to play Queen of Spades when we're the trailing player
...
Previously in a trick like 2S, KS, 5S we'd rather follow up with AS
instead of QS. We should prefer to play QS in this case.
2021-05-22 12:03:31 +01:00
Gunnar Beutner
0dd22c4e23
Hearts: Fix crash when starting an animation when there already is one
...
This ensures that the preceding animation is stopped first.
2021-05-22 12:03:31 +01:00
Gunnar Beutner
dfa2075887
Hearts: Remove dead code
2021-05-22 12:03:31 +01:00
Gunnar Beutner
c3efae85f2
Games: Add Hearts
2021-05-21 23:38:18 +02:00