From 92f8870fa7a75be8458e35fb8de51965c5c33d91 Mon Sep 17 00:00:00 2001 From: Mario Kilies Date: Tue, 25 Jan 2011 22:41:59 +0100 Subject: Slowed down the 'play cards' state by inserting a delay. The player who is currently placing its card/picking its stack is highlighted. --- src/game.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/game.c') diff --git a/src/game.c b/src/game.c index 1390e43..ad88a9f 100644 --- a/src/game.c +++ b/src/game.c @@ -106,7 +106,7 @@ void start_game(const bool servermode, const char* addr, const char* port) { int server_sock; socket_list_t client_socks; - uint8_t num_players = 2; + uint8_t num_players = 3; srand(time(0)); // Initialize RNG //srand(1337); // Constant debug RNG seed @@ -142,7 +142,7 @@ void start_game(const bool servermode, const char* addr, const char* port) sock = client_connect_server(addr, port); data_store_t *data = data_store(); - strncpy(data->nickname, "nickname", 10); + strncpy(data->nickname, getenv("USER"), 10); net_send(sock, msg_type_hello_c, NULL); net_recv(sock, msg_type_hello_s); net_recv(sock, msg_type_start_game); @@ -158,6 +158,14 @@ void start_game(const bool servermode, const char* addr, const char* port) main_loop_client(sock); ui_fini(); + + printf("Final scores:\n"); + player_list_entry_t *ple; + for (int i = 0; i < data->player_list.count; i++) + { + ple = &data->player_list.players[i]; + printf("%s: %d\n", ple->player_name, ple->score); + } } destroy_data_store(); -- cgit v1.2.3