|
@@ -349,12 +349,15 @@ boolean bomb_explode(Game* g, int playerIndex, int x, int y, JsonEncoder* json)
|
|
switch (g->map[x][y]) {
|
|
switch (g->map[x][y]) {
|
|
case '1':
|
|
case '1':
|
|
add_string(json, "type", "classic");
|
|
add_string(json, "type", "classic");
|
|
|
|
+ g->player[playerIndex]->classicBomb++;
|
|
break;
|
|
break;
|
|
case '2':
|
|
case '2':
|
|
add_string(json, "type", "mine");
|
|
add_string(json, "type", "mine");
|
|
|
|
+ g->player[playerIndex]->mine++;
|
|
break;
|
|
break;
|
|
case '3':
|
|
case '3':
|
|
add_string(json, "type", "remote");
|
|
add_string(json, "type", "remote");
|
|
|
|
+ g->player[playerIndex]->remoteBomb++;
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
if(playerIndex >= 0) pthread_mutex_unlock(&playerMutex[(g->index * MAXPLAYER) + playerIndex]);
|
|
if(playerIndex >= 0) pthread_mutex_unlock(&playerMutex[(g->index * MAXPLAYER) + playerIndex]);
|