14#define MAX_HAND_SIZE 16
44 HAND_TYPE_MAX = FLUSH_FIVE
58 u16 THREE_OF_A_KIND : 1;
62 u16 FOUR_OF_A_KIND : 1;
63 u16 STRAIGHT_FLUSH : 1;
65 u16 FIVE_OF_A_KIND : 1;
77const char* get_hand_type_name(
enum HandType hand_type);
void set_hand_state(enum HandState)
Set the hand state. Primarily used by the GAME_PLAYING game state.
void hand_set_nb_selected_cards(int new_selections)
Set the current number of selected Cards.
ContainedHandTypes * get_contained_hands(void)
Get the contained hands within the selected hand.
int find_flush_in_played_cards(CardObject **played, int top, int min_len, bool *out_selection)
Finds the best flush (set of cards with the same suit) in the given array of played cards.
enum HandType get_hand_type(void)
Get the current hand type.
int get_hand_top(void)
Get the position in hand array of the last card obtained.
enum HandState get_hand_state(void)
Get the hand state.
void swap_cards_in_hand(int idx_a, int idx_b)
Swaps the order of two cards in hand.
int find_straight_in_played_cards(CardObject **played, int top, int min_len, bool *out_selection)
Finds the best straight in the given array of played cards.
CardObject ** get_hand_array(void)
Get the hand array of Cards currently held in hand.
int hand_get_nb_selected_cards(void)
Get the current number of selected Cards.
void select_paired_cards_in_hand(CardObject **played, int top, bool *selection)
This is used for the special case in "Four Fingers" where you can add a pair into a straight (e....
void reorder_card_sprites_layers(void)
Destroy the sprites of the Cards held in hand and recreate then in the same order as the Cards in the...
void set_hand_top(int new_hand_top)
Set the position in hand array of the last card obtained.
void hand_select_card(int index)
Set the card at a given index in Hand as selected.
void hand_change_sort(bool to_sort_by_suit)
Switch to the given sort method. Can sort playing cards in two ways: by rank and suit....
void compute_hand_value_info(void)
Determine the HandType and ContainedHandTypes of the currently selected Cards, then print the Hand's ...
void sort_cards(void)
Sort the hand array according to the selected method to do that.
void hand_deselect_all_cards(void)
Deselect all cards in hand.
int hand_nb_held_cards(void)
Get the current number of Cards in hand.