back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/client/printing_game_frames.c
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-08-16 18:10:11 +0300
committerscratko <m@scratko.xyz>2024-08-16 18:10:11 +0300
commiteb90648bdad1443c9cfc72e903a93642e10a0ab7 (patch)
treedc567a9aa834bb0d5f3429e8a38910990d75e4eb /client/printing_game_frames.c
parent880b8be2c28d761505b2eecc1386919d5add6f2f (diff)
downloaddurak-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 'client/printing_game_frames.c')
-rw-r--r--client/printing_game_frames.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/client/printing_game_frames.c b/client/printing_game_frames.c
index f75cec5..5c7deac 100644
--- a/client/printing_game_frames.c
+++ b/client/printing_game_frames.c
@@ -3,6 +3,14 @@
#include <stdio.h>
+void pgf_new_frame()
+{
+ int i;
+
+ for(i = 0; i < 25; ++i)
+ printf("\n");
+}
+
void pgf_first_player()
{
printf("=======================================\n"
@@ -54,7 +62,8 @@ void pgf_table(struct client *cl)
printf("\n");
deck = deck->next;
}
- printf("\n");
+ if(cl->deck)
+ printf("\n");
}
void pgf_suggestions(struct client *cl)
@@ -104,3 +113,24 @@ void pgf_tossing_limit_status()
printf("the cards were not accepted.\n"
"The other players have already tossed cards.\n");
}
+
+void pgf_spectator_mode(enum spectator_mode sp_mode)
+{
+ printf("spectator mode\n");
+ if(sp_mode == spectator_attack)
+ printf("attacker makes a move\n");
+ else if(sp_mode == spectator_defense)
+ printf("defender make a move\n");
+ else if(sp_mode == spectator_tossing)
+ printf("players toss in extra cards\n");
+ else
+ printf("round result\n");
+}
+
+void pgf_game_result(int durak_position)
+{
+ printf("===============================\n"
+ " END OF GAME\n"
+ "player under number %u is durak\n"
+ "===============================\n", durak_position);
+}