3D spaceshooter with online scoreboard, online demos, ship building. Now entirely defunct, but might be resurrected
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
sector/src/net/sector/level/highscore/HighscoreTable.java

42 lines
685 B

package net.sector.level.highscore;
import java.util.Collections;
import net.sector.CustomIonMarks;
import com.porcupine.ion.AbstractIonList;
/**
* A highscore table
*
* @author Ondřej Hruška (MightyPork)
*/
public class HighscoreTable extends AbstractIonList<HighscoreEntry> {
/**
* Add a highscore
*
* @param score
* @param name
* @return the new score
*/
public HighscoreEntry addScore(int score, String name) {
HighscoreEntry e;
add(e = new HighscoreEntry(score, name));
return e;
}
/**
* Sort entries
*/
public void sort() {
Collections.sort(this);
}
@Override
public byte ionMark() {
return CustomIonMarks.HIGHSCORE_TABLE;
}
}