Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1856 in orxonox.OLD for orxonox/trunk/core/world.cc


Ignore:
Timestamp:
May 5, 2004, 10:32:15 AM (21 years ago)
Author:
patrick
Message:

orxonox/trunk/core: test routines added, other minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/core/world.cc

    r1855 r1856  
    1919#include "world.h"
    2020
     21#include <iostream>
     22
     23using namespace std;
    2124
    2225
     
    2427World::World () {
    2528  lastPlayer = null;
    26   lastPlayer->nextPlayer = null;
    2729}
    2830
     
    4042{
    4143  playerList* listMember = new playerList;
    42   listMember->nextPlayer = lastPlayer;
    4344  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    }
    4555  lastPlayer = listMember;
    4656}
     
    5363   testing, testing, testing...
    5464*/
    55 boot World::testRouting()
     65void World::testThaTest()
    5666{
     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    }
    5776
     77  cout << "World::testThaTest() finished" << endl;
    5878}
    5979
Note: See TracChangeset for help on using the changeset viewer.