Package net.starype.quiz.api.game
Class LeaderboardDistribution
- java.lang.Object
-
- net.starype.quiz.api.game.LeaderboardDistribution
-
- All Implemented Interfaces:
java.util.function.Function<Player<?>,java.lang.Double>
,ScoreDistribution
public class LeaderboardDistribution extends java.lang.Object implements ScoreDistribution
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LeaderboardDistribution.LeaderboardPosition
-
Nested classes/interfaces inherited from interface net.starype.quiz.api.game.ScoreDistribution
ScoreDistribution.Standing
-
-
Field Summary
-
Fields inherited from interface net.starype.quiz.api.game.ScoreDistribution
EPSILON
-
-
Constructor Summary
Constructors Constructor Description LeaderboardDistribution(double maxAwarded, int playersCount)
-
Method Summary
Modifier and Type Method Description java.lang.Double
apply(Player player)
java.util.Collection<? extends LeaderboardDistribution.LeaderboardPosition>
getLeaderboard()
void
scoreUpdate(IDHolder<?> player, double score)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.starype.quiz.api.game.ScoreDistribution
applyAll, roundedApply
-
-
-
-
Method Detail
-
scoreUpdate
public void scoreUpdate(IDHolder<?> player, double score)
-
apply
public java.lang.Double apply(Player player)
- Specified by:
apply
in interfacejava.util.function.Function<Player<?>,java.lang.Double>
-
getLeaderboard
public java.util.Collection<? extends LeaderboardDistribution.LeaderboardPosition> getLeaderboard()
-
-