Exemple #1
0
 public Tournament(string Title, DateTime Date, int CurrentRound, PairingFactory.PairingSystems PairingSystem)
 {
     this.PairingSystem = PairingFactory.GetPairing(PairingSystem, CurrentRound);
     this.Title         = Title;
     this.Date          = Date;
     this.CurrentRound  = CurrentRound;
 }
Exemple #2
0
 public Tournament(TournamentModel model, List <PlayerModel> playerModels, PairingFactory.PairingSystems PairingSystem)
 {
     this.Title         = model.Title;
     this.Date          = model.Date;
     this.PairingSystem = PairingFactory.GetPairing(PairingSystem, model.CurrentRound);
     this.CurrentRound  = model.CurrentRound;
     this.Players       = new List <Player>();
     foreach (PlayerModel playerModel in playerModels)
     {
         List <PlayerModel> opponents = new List <PlayerModel>();
         foreach (Opponent opponent in playerModel.Opponents)
         {
             PlayerModel playerModelOpponent = playerModels.Find(p => p.GUID == opponent.OpponentID);
             opponents.Add(playerModelOpponent);
         }
         this.Players.Add(new Player(playerModel, opponents));
     }
 }
Exemple #3
0
 public Tournament(PairingFactory.PairingSystems PairingSystem)
 {
     this.PairingSystem = PairingFactory.GetPairing(PairingSystem, Players);
 }