From 4b2fdc91d42a438193d15840e10851c3847fbe80 Mon Sep 17 00:00:00 2001 From: scratko Date: Sat, 17 Aug 2024 02:42:19 +0300 Subject: Global fixes v3.0 Fixed bug when entering cards incorrectly. Added recognition of disconnection from the server. Added welcome screen and update screen. --- client/printing_game_frames.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'client/printing_game_frames.c') 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 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"); } -- cgit v1.2.3