Skip to content

Commit

Permalink
Remove some outdated TODOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexLandau committed Dec 1, 2015
1 parent 314914d commit 4a2e558
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/main/java/net/alloyggp/tournament/internal/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ private Game(String id, String url, int numRoles, boolean fixedSum) {
this.fixedSum = fixedSum;
}

//TODO: Clients don't need to instantiate this
public static Game create(String id, String url, int numRoles, boolean fixedSum) {
return new Game(id, url, numRoles, fixedSum);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* a non-zero value, the client should wait instead of scheduling
* additional matches.
*/
//TODO: Make the public-facing part an interface
public class StandardNextMatchesResult implements TNextMatchesResult {
private final ImmutableSet<TMatchSetup> matchesToRun;
//Note: These may be moved into individual matches in the future.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.NotThreadSafe;

import net.alloyggp.tournament.api.TGame;
import net.alloyggp.tournament.api.TMatchResult.Outcome;
import net.alloyggp.tournament.api.TMatchSetup;
import net.alloyggp.tournament.api.TNextMatchesResult;
import net.alloyggp.tournament.api.TPlayer;
import net.alloyggp.tournament.api.TPlayerScore;
import net.alloyggp.tournament.api.TRanking;
import net.alloyggp.tournament.api.TScore;
import net.alloyggp.tournament.api.TSeeding;
import net.alloyggp.tournament.internal.quasirandom.QuasiRandomMatchGenerator;
import net.alloyggp.tournament.internal.quasirandom.RolesFirstImpl3p2;
import net.alloyggp.tournament.internal.spec.MatchSpec;
import net.alloyggp.tournament.internal.spec.RoundSpec;

import org.joda.time.DateTime;

import com.google.common.base.Function;
Expand All @@ -47,6 +33,20 @@
import com.google.common.collect.SetMultimap;
import com.google.common.collect.Sets;

import net.alloyggp.tournament.api.TGame;
import net.alloyggp.tournament.api.TMatchResult.Outcome;
import net.alloyggp.tournament.api.TMatchSetup;
import net.alloyggp.tournament.api.TNextMatchesResult;
import net.alloyggp.tournament.api.TPlayer;
import net.alloyggp.tournament.api.TPlayerScore;
import net.alloyggp.tournament.api.TRanking;
import net.alloyggp.tournament.api.TScore;
import net.alloyggp.tournament.api.TSeeding;
import net.alloyggp.tournament.internal.quasirandom.QuasiRandomMatchGenerator;
import net.alloyggp.tournament.internal.quasirandom.RolesFirstImpl3p2;
import net.alloyggp.tournament.internal.spec.MatchSpec;
import net.alloyggp.tournament.internal.spec.RoundSpec;

public class SwissFormat1Runner implements FormatRunner {
private static final SwissFormat1Runner INSTANCE = new SwissFormat1Runner();

Expand All @@ -70,7 +70,7 @@ private static class SwissFormatSimulator {
private final ImmutableSet<InternalMatchResult> resultsFromEarlierStages;
private final ImmutableSet<InternalMatchResult> resultsInStage;
private final Set<TMatchSetup> matchesToRun = Sets.newHashSet();
//TODO: Double-check that all these stats are updated appropriately

private TGame mostRecentGame = null; //of a fully completed round
private final Map<TPlayer, Double> totalPointsScored = Maps.newHashMap();
private final Map<Game, Map<TPlayer, Double>> pointsScoredByGame = Maps.newHashMap();
Expand Down Expand Up @@ -229,8 +229,6 @@ private void runRound(RoundSpec round, int roundNum, Set<InternalMatchResult> ro
TPlayer player = playersInRoleOrder.get(role);
double goalValue = result.getGoals().get(role) * match.getWeight();

//TODO: Add to stats here, including stats yet to be introduced
//such as player-player meetings
addToSumWithKey(player, goalValue, totalPointsScored);
addToSumWithKey(player, goalValue, pointsScoredByGame.get(game));

Expand Down Expand Up @@ -690,7 +688,6 @@ private static TGame getOnlyGame(RoundSpec round) {

@Override
public void validateRounds(ImmutableList<RoundSpec> rounds) {
//TODO: Implement
for (RoundSpec round : rounds) {
//Validates all matches in the round are the same game
getOnlyGame(round);
Expand Down

0 comments on commit 4a2e558

Please sign in to comment.