Changeset e103b51 in network-game for client/Client


Ignore:
Timestamp:
Dec 17, 2013, 3:04:22 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
31b347a
Parents:
1248984
Message:

Client deletes games with no players remaining

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    r1248984 re103b51  
    878878               cout << "Received game info for " << gameName << " (num players: " << numPlayers << ")" << endl;
    879879               
    880                mapGames[gameName] = numPlayers;
     880               if (numPlayers > 0)
     881                  mapGames[gameName] = numPlayers;
     882               else
     883                  mapGames.erase(gameName);
    881884
    882885               break;
     
    933936               cout << "Received game info for " << gameName << " (num players: " << numPlayers << ")" << endl;
    934937               
    935                mapGames[gameName] = numPlayers;
     938               if (numPlayers > 0)
     939                  mapGames[gameName] = numPlayers;
     940               else
     941                  mapGames.erase(gameName);
    936942
    937943               break;
Note: See TracChangeset for help on using the changeset viewer.