Exemplo n.º 1
0
 public void RemovePlayer(TeamTemplate template, Player player)
 {
     if(template.Count == 1)
         throw new Exception("You can't remove the last Player");
     template.Remove(player);
     foreach (var play in timeline) {
         play.Players.RemoveByPlayer(player);
     }
 }
Exemplo n.º 2
0
        int GetPlayerCount(List<Play> plays, Player player, PlayerSubCategory subcat)
        {
            PlayerTag tag;

            tag = new PlayerTag{SubCategory=subcat, Value=player};
            return plays.Where(p => p.Players.Contains(tag)).Count();
        }