From 831f9f01fbe4088eb6bd378c0e417d9996b676fd Mon Sep 17 00:00:00 2001 From: scratko Date: Fri, 30 Aug 2024 12:46:56 +0300 Subject: Final version v2.0 Added windows client. SIGPIPE signal was being sent to the server when the client was disconnected. Now there is handling of this signal. Added a delay when displaying some informational messages. --- windows_client/card_stack.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 windows_client/card_stack.h (limited to 'windows_client/card_stack.h') diff --git a/windows_client/card_stack.h b/windows_client/card_stack.h new file mode 100644 index 0000000..0daf40a --- /dev/null +++ b/windows_client/card_stack.h @@ -0,0 +1,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 -- cgit v1.2.3