testing formatting

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void CircleList::add(string s)
{
  Player p;
  p.name=s;
  if(count==0) // no players at the table
  {
    // special case: adds a player to an empty table
    playerArray[0]=p; 
    count=1; // adds the first player
    whoWasLastToPlay=0; // whoWasLastToPlay at pos 0
  }
  else
  {
    for(int i=count-1; i>=whoWasLastToPlay+1; i--)
    {
      playerArray[i+1]=playerArray[i];
    }
    playerArray[whoWasLastToPlay+1]=p;
    count++;
  }
}
Topic archived. No new replies allowed.