Example #1
0
        public void AddPlayer(PlayerTradable player)
        {
            var validators
                = new List <IValidator> {
                TradeOfferValidatorFactory.OfferCannotHavePlayer(this, player),
                ClubValidatorFactory.ClubMustHavePlayer(this.Club, player)
                };

            if (!ValidationHelper.ValidateProcess(validators))
            {
                return;
            }

            this.Players.Add(player);
        }
Example #2
0
 public void AddPlayer(PlayerTradable player)
 {
     this.Players.Add(player);
 }
Example #3
0
 public void RemovePlayer(PlayerTradable player)
 {
     this.Players.Remove(this.Players.FirstOrDefault(x => x.Id == player.Id));
 }
Example #4
0
 public bool HasPlayer(PlayerTradable player)
 {
     return(this.Players.Any(x => x.Id == player.Id));
 }