mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
LibCards+Games: Change name of card type to card suit
Playing cards have a `suit` such as `hearts`/`diamonds`, not a `type`. Make the internal naming consistent with the way playing cards are typically named.
This commit is contained in:
parent
4c5e9f5633
commit
a51fce6c0f
9 changed files with 78 additions and 78 deletions
|
@ -35,13 +35,13 @@ public:
|
|||
|
||||
NonnullRefPtrVector<Card> pick_cards_to_pass(PassingDirection);
|
||||
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_low_points_high_value_card(Optional<Card::Suit> suit = {});
|
||||
Optional<size_t> pick_lower_value_card(Card& other_card);
|
||||
Optional<size_t> pick_slightly_higher_value_card(Card& other_card);
|
||||
size_t pick_max_points_card(Function<bool(Card&)>);
|
||||
Optional<size_t> pick_specific_card(Card::Type type, CardValue value);
|
||||
Optional<size_t> pick_specific_card(Card::Suit suit, CardValue value);
|
||||
size_t pick_last_card();
|
||||
bool has_card_of_type(Card::Type type);
|
||||
bool has_card_of_suit(Card::Suit suit);
|
||||
Vector<CardWithIndex> hand_sorted_by_fn(bool (*)(CardWithIndex&, CardWithIndex&)) const;
|
||||
|
||||
void sort_hand() { quick_sort(hand, hearts_card_less); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue