diff options
author | scratko <m@scratko.xyz> | 2024-08-16 18:10:11 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-08-16 18:10:11 +0300 |
commit | eb90648bdad1443c9cfc72e903a93642e10a0ab7 (patch) | |
tree | dc567a9aa834bb0d5f3429e8a38910990d75e4eb /server/server.h | |
parent | 880b8be2c28d761505b2eecc1386919d5add6f2f (diff) | |
download | durak-eb90648bdad1443c9cfc72e903a93642e10a0ab7.tar.gz durak-eb90648bdad1443c9cfc72e903a93642e10a0ab7.tar.bz2 durak-eb90648bdad1443c9cfc72e903a93642e10a0ab7.zip |
Global fixes v2.0
Added spectator mode.
Added screen of game result.
Added definition of durak.
If not all players can replenish their decks, they take cards one at a time in
turn.
Diffstat (limited to 'server/server.h')
-rw-r--r-- | server/server.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/server/server.h b/server/server.h index 86e0fca..3578606 100644 --- a/server/server.h +++ b/server/server.h @@ -26,7 +26,8 @@ enum server_states { defense_phase_in, tossing_phase_out, tossing_phase_in, - table + table, + end_game }; enum client_game_states { @@ -39,7 +40,9 @@ enum client_game_states { defense, tossing, card_acceptance_status, - tossing_limit_status + tossing_limit_status, + spectator, + result }; enum tossing_mode { @@ -49,6 +52,13 @@ enum tossing_mode { none }; +enum spectator_mode { + spectator_attack, + spectator_defense, + spectator_tossing, + spectator_table +}; + struct session { int fd; enum client_game_states state; @@ -90,10 +100,16 @@ struct server { const char *trump_card; struct game_info *gi; struct session **turn_queue; + /* changes if the player has discarded all his cards + * (and shuffled_deck_size == 0) + */ + int turn_queue_size; struct card_count cc; int position_whose_turn; struct card_queue cq; struct cards_on_table cot; + int durak_position; + int tossing_limit; }; #endif |