Example #1
0
        /// <summary>
        /// Removes the participant.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="participant">The participant.</param>
        private void RemoveParticipant <T>(T participant)
        {
            if (participant != null)
            {
                if (participant is Player)
                {
                    var player = participant as Player;

                    if (Players != null && Players.Contains(player))
                    {
                        Players.Remove(player);
                    }
                }
                else if (participant is Referee)
                {
                    var referee = participant as Referee;

                    if (Referees != null && Referees.Contains(referee))
                    {
                        Referees.Remove(referee);
                    }
                }
                else if (participant is GameMaster)
                {
                    GameMaster = null;
                }
            }
        }
Example #2
0
 public void RemoveReferee(Referee referee)
 {
     Referees.Remove(referee);
 }