diff options
Diffstat (limited to 'Userland/Games/Hearts/Player.h')
-rw-r--r-- | Userland/Games/Hearts/Player.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Games/Hearts/Player.h b/Userland/Games/Hearts/Player.h index 11d33c5e53..73435d5109 100644 --- a/Userland/Games/Hearts/Player.h +++ b/Userland/Games/Hearts/Player.h @@ -7,12 +7,18 @@ #pragma once #include "Helpers.h" +#include <AK/QuickSort.h> #include <LibCards/Card.h> using Cards::Card; namespace Hearts { +struct CardWithIndex { + NonnullRefPtr<Card> card; + size_t index; +}; + struct Player { AK_MAKE_NONMOVABLE(Player); @@ -29,6 +35,7 @@ public: Optional<size_t> pick_specific_card(Card::Type type, CardValue value); size_t pick_last_card(); bool has_card_of_type(Card::Type type); + Vector<CardWithIndex> hand_sorted_by_points_and_value() const; void sort_hand() { quick_sort(hand, hearts_card_less); } |