Changeset 321fbbc in network-game for client/Client/main.cpp
- Timestamp:
- Sep 26, 2013, 5:41:56 PM (11 years ago)
- Branches:
- master
- Children:
- b92e6a7
- Parents:
- 2992b1a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
r2992b1a r321fbbc 119 119 chat chatConsole, debugConsole; 120 120 bool debugging; 121 map<string, Game> mapGames;121 map<string, int> mapGames; 122 122 123 123 MessageProcessor msgProcessor; … … 452 452 453 453 if (wndCurrent == wndLobby) { 454 map<string, Game>::iterator it;454 map<string, int>::iterator it; 455 455 int i=0; 456 456 ostringstream ossGame; 457 457 for (it = mapGames.begin(); it != mapGames.end(); it++) { 458 ossGame << it->first << " (" << it->second .getNumPlayers()<< " players)" << endl;458 ossGame << it->first << " (" << it->second << " players)" << endl; 459 459 al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*1/4-100, 120+i*15, ALLEGRO_ALIGN_LEFT, ossGame.str().c_str()); 460 460 ossGame.clear(); … … 836 836 cout << "Received game info for " << gameName << " (num players: " << numPlayers << ")" << endl; 837 837 838 if (mapGames.find(gameName) == mapGames.end()) 839 mapGames[gameName] = Game(gameName); 840 mapGames[gameName].setNumPlayers(numPlayers); 838 mapGames[gameName] = numPlayers; 841 839 842 840 break;
Note:
See TracChangeset
for help on using the changeset viewer.