All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.alloyggp.tournament.internal.Seedings Maven / Gradle / Ivy

package net.alloyggp.tournament.internal;

import java.util.List;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;

import net.alloyggp.tournament.api.TPlayer;
import net.alloyggp.tournament.api.TRanking;
import net.alloyggp.tournament.api.TSeeding;

public class Seedings {
    private Seedings() {
        //Not instantiable
    }

    public static TSeeding getSeedingsFromFinalStandings(TRanking standings, int playerCutoff) {
        List eligiblePlayers = ImmutableList.copyOf(
                Iterables.limit(standings.getPlayersBestFirst(), playerCutoff));
        return TSeeding.create(eligiblePlayers);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy