back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/windows_client/card_stack.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-08-30 12:46:56 +0300
committerscratko <m@scratko.xyz>2024-08-30 14:59:44 +0300
commit831f9f01fbe4088eb6bd378c0e417d9996b676fd (patch)
tree53297459d35ad795618c351a79b1829776e5e1f4 /windows_client/card_stack.h
parent4b6c15f780d59895f067383a5041edcfe86f504e (diff)
downloaddurak-831f9f01fbe4088eb6bd378c0e417d9996b676fd.tar.gz
durak-831f9f01fbe4088eb6bd378c0e417d9996b676fd.tar.bz2
durak-831f9f01fbe4088eb6bd378c0e417d9996b676fd.zip
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.
Diffstat (limited to 'windows_client/card_stack.h')
-rw-r--r--windows_client/card_stack.h30
1 files changed, 30 insertions, 0 deletions
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