back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/windows_client/card_stack.h
blob: 0daf40a3b676550bc5de32b9a10981fa6e824936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CARD_STACK_H_SENTRY
#define CARD_STACK_H_SENTRY

struct card_stack_item {
    char *str;
    struct card_stack_item *next;
    /* like a, b, c etc */
    unsigned char tip;
    /* 1 - can be used, 0 - can't take it */
    int is_usable;
};

typedef struct card_stack_item* player_cards;

void init_stack(player_cards *deck);
void push_stack(player_cards *deck, char *str);
void clear_stack(player_cards *deck);
int is_empty_stack(player_cards deck);
void add_hint_letters_stack(player_cards deck);
void mark_card_for_attackers_stack(player_cards deck);

struct cards_on_table;
void mark_card_for_defenders_stack(player_cards deck,
                                   struct cards_on_table *cot,
                                   char* trump_suit);
void mark_card_for_tossing_stack(player_cards deck, struct cards_on_table *cot);
char* card_search_by_marked_letter(player_cards deck, int letter);
char* card_search_by_unmarked_letter(player_cards deck, int letter);

#endif