Changeset 1856 in orxonox.OLD for orxonox/trunk/core/world.cc
- Timestamp:
- May 5, 2004, 10:32:15 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/world.cc
r1855 r1856 19 19 #include "world.h" 20 20 21 #include <iostream> 22 23 using namespace std; 21 24 22 25 … … 24 27 World::World () { 25 28 lastPlayer = null; 26 lastPlayer->nextPlayer = null;27 29 } 28 30 … … 40 42 { 41 43 playerList* listMember = new playerList; 42 listMember->nextPlayer = lastPlayer;43 44 listMember->player = player; 44 listMember->playerNr = lastPlayer->playerNr + 1; 45 if ( lastPlayer != null ) 46 { 47 listMember->number = lastPlayer->number + 1; 48 listMember->next = lastPlayer; 49 } 50 else 51 { 52 listMember->number = 0; 53 listMember->next = null; 54 } 45 55 lastPlayer = listMember; 46 56 } … … 53 63 testing, testing, testing... 54 64 */ 55 boot World::testRouting()65 void World::testThaTest() 56 66 { 67 cout << "World::testThaTest() called" << endl; 68 /* test addPlayer */ 69 cout << "addPlayer test..." << endl; 70 playerList* pl = lastPlayer; 71 while ( pl != null ) 72 { 73 cout << "player " << pl->number << " was found" << endl; 74 pl = pl->next; 75 } 57 76 77 cout << "World::testThaTest() finished" << endl; 58 78 } 59 79
Note: See TracChangeset
for help on using the changeset viewer.