* Tournament - Show players of tournament sorted by their tournament points.

This commit is contained in:
LevelX2 2014-02-20 15:03:14 +01:00
parent e40b44ed79
commit 2b2594d993
4 changed files with 15 additions and 7 deletions

View file

@ -36,7 +36,7 @@ import mage.game.tournament.TournamentPlayer;
*
* @author BetaSteward_at_googlemail.com
*/
public class TournamentPlayerView implements Serializable {
public class TournamentPlayerView implements Serializable, Comparable{
private static final long serialVersionUID = 1L;
private final String name;
@ -77,4 +77,9 @@ public class TournamentPlayerView implements Serializable {
return quit;
}
@Override
public int compareTo(Object t) {
return ((TournamentPlayerView) t).getPoints() - this.getPoints();
}
}