Britbot
void Britbot.Group.AddPirate ( int  index,
bool  remove = true 
) [inline]

Adds a pirate to this group, removing it from any other group it was in.

Parameters:
indexThe pirate's index

Definition at line 855 of file Group.cs.

        {
            //make sure that the pirate is not controlled by other groups by removing it from them
            if(remove)
                foreach (Group g in Commander.Groups)
                {
                    //NOTE! that is correct - it does not remove *at* the index but find the right one
                    g.Pirates.Remove(index);
                }

            //add the pirate to this group index
            this.Pirates.Add(index);
        }