back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/client/printing_game_frames.c
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-08-17 02:42:19 +0300
committerscratko <m@scratko.xyz>2024-08-17 02:42:19 +0300
commit4b2fdc91d42a438193d15840e10851c3847fbe80 (patch)
tree08c3de6e851ee07463beae6d0a2fbd9e74202662 /client/printing_game_frames.c
parenteb90648bdad1443c9cfc72e903a93642e10a0ab7 (diff)
downloaddurak-4b2fdc91d42a438193d15840e10851c3847fbe80.tar.gz
durak-4b2fdc91d42a438193d15840e10851c3847fbe80.tar.bz2
durak-4b2fdc91d42a438193d15840e10851c3847fbe80.zip
Global fixes v3.0
Fixed bug when entering cards incorrectly. Added recognition of disconnection from the server. Added welcome screen and update screen.
Diffstat (limited to 'client/printing_game_frames.c')
-rw-r--r--client/printing_game_frames.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/client/printing_game_frames.c b/client/printing_game_frames.c
index 5c7deac..bda1208 100644
--- a/client/printing_game_frames.c
+++ b/client/printing_game_frames.c
@@ -11,6 +11,24 @@ void pgf_new_frame()
printf("\n");
}
+void pgf_welcome()
+{
+ printf("======================================================\n"
+ " Welcome!\n"
+ "You're playing siege durak/Podkidnoy (Throw-in) durak\n\n"
+ "If you have any questions, you can contact by email to\n"
+ " m@scratko.xyz\n"
+ "======================================================\n");
+}
+
+void pgf_connection(int status)
+{
+ if(status)
+ printf("Connection to the server has been successfully established\n");
+ else
+ printf("Sorry, failed to connect to the server\n");
+}
+
void pgf_first_player()
{
printf("=======================================\n"
@@ -23,7 +41,7 @@ void pgf_confirmation_waiting(int total_players)
{
printf("=======================================\n"
" To start game press <Enter> key \n"
- "Connected players: %u/8 \n"
+ " Connected players: %u/8 \n"
"=======================================\n", total_players);
}
@@ -71,8 +89,7 @@ void pgf_suggestions(struct client *cl)
struct card_stack_item *deck = NULL;
if(cl->state == attack || cl->state == tossing)
- printf("you can specify more than one card "
- "(under certain conditions)\n");
+ printf("you can specify more than one card\n");
deck = cl->deck;
while(deck) {
if(deck->is_usable)
@@ -129,8 +146,13 @@ void pgf_spectator_mode(enum spectator_mode sp_mode)
void pgf_game_result(int durak_position)
{
- printf("===============================\n"
- " END OF GAME\n"
- "player under number %u is durak\n"
- "===============================\n", durak_position);
+ printf("=======================================\n"
+ " END OF GAME\n"
+ " player number %u is durak\n"
+ "=======================================\n", durak_position);
+}
+
+void pgf_disconnect()
+{
+ printf("Server connection disconnected\n");
}