- Timestamp:
- Sep 26, 2013, 5:41:56 PM (11 years ago)
- Branches:
- master
- Children:
- b92e6a7
- Parents:
- 2992b1a
- Location:
- common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Game.cpp
r2992b1a r321fbbc 24 24 } 25 25 26 void Game::setNumPlayers(int numPlayers) {27 int numCurPlayers = this->getNumPlayers();28 int numNewPlayers = numPlayers-numCurPlayers;29 30 for (int i=0; i<numNewPlayers; i++)31 this->players[numCurPlayers+i] = NULL;32 }33 34 26 bool Game::addPlayer(Player* p) { 35 27 if (players.count(p->id) == 0) { -
common/Game.h
r2992b1a r321fbbc 33 33 34 34 void setId(int id); 35 void setNumPlayers(int numPlayers);36 35 bool addPlayer(Player* p); 37 36 bool removePlayer(int id);
Note:
See TracChangeset
for help on using the changeset viewer.