diff options
| author | Mario Kilies <MarioKilies@GMX.net> | 2011-01-25 15:15:50 +0100 |
|---|---|---|
| committer | Mario Kilies <MarioKilies@GMX.net> | 2011-01-25 15:15:50 +0100 |
| commit | 72504b3fa304c1bf0731fec80d3b85c5481ee0a2 (patch) | |
| tree | cf63b9ca7554f91ba23b0e90248ad9c3e37cf6cd /src/client_game_states.c | |
| parent | 67544359124cf01fd8a77c7be1d91a50ae5f3c22 (diff) | |
Added client side score calculation for players.
Diffstat (limited to 'src/client_game_states.c')
| -rw-r--r-- | src/client_game_states.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client_game_states.c b/src/client_game_states.c index b21417a..142693e 100644 --- a/src/client_game_states.c +++ b/src/client_game_states.c @@ -71,8 +71,6 @@ game_state_t state_client_play_cards(const int sock, const uint8_t round) if(stack_idx >= NUM_TABLE_STACKS) // card does not fit on any stack { - uint32_t stack_points; - if(ds->player_list.players[i].player_id == ds->own_player_id) // our turn to select stack { ui_display_wnd_messages("Please choose a stack"); @@ -81,7 +79,7 @@ game_state_t state_client_play_cards(const int sock, const uint8_t round) } net_recv(sock, msg_type_selected_stack_s); - stack_points = card_stack_get_points(&ds->table_stacks.stacks[ds->stack_index]); + ds->player_list.players[i].score += card_stack_get_points(&ds->table_stacks.stacks[ds->stack_index]); card_stack_clear(&ds->table_stacks.stacks[ds->stack_index], c); } else // card fits on a stack -> place it @@ -89,7 +87,7 @@ game_state_t state_client_play_cards(const int sock, const uint8_t round) card_stack_t* cs = &ds->table_stacks.stacks[stack_idx]; if(cs->cards[MAX_CARD_STACK_SIZE-1] != 0) // stack is full { - uint32_t stack_points = card_stack_get_points(cs); + ds->player_list.players[i].score += card_stack_get_points(cs); card_stack_clear(cs, c); } else |
