コード例 #1
0
 /** Builds the rounds. */
 private void buildRounds() {
   UtilFixtureBuilder.addDummyIfNeeded(this.tourney);
   for (int roundId = 0; roundId < this.amountOfRounds; roundId++) {
     Round round = new Round(roundId, this.tourney.teams(), this.halfTourney);
     this.rounds.add(round);
   }
   UtilFixtureBuilder.removeDummyIfNeeded(this.tourney);
 }
コード例 #2
0
 /**
  * Class' constructor.
  *
  * @param aTourney model.Tourney that contains the information needed to build this up.
  */
 public Fixture(Tourney aTourney) {
   this.tourney = aTourney;
   this.rounds = new ArrayList<Round>();
   this.amountOfRounds = UtilFixtureBuilder.calculateAmountOfRounds(this.tourney);
   this.halfTourney = amountOfRounds / 2;
   this.buildRounds();
 }