|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.comedia.game.CHighScores
Presents a table of high scores for game beans.
Field Summary | |
static int |
MAX_SCORES
The maximum table length. |
Constructor Summary | |
CHighScores()
Constructs this table with default values. |
Method Summary | |
void |
addScore(java.lang.String player,
int score)
Adds a new score into this table |
void |
clear()
Clears this score table. |
java.lang.String |
formatScore(int index,
int length)
Formats a score by specified index. |
int |
getLength()
Gets the current table length. |
int |
getMinimumScore()
Gets the minimum score in the table. |
java.lang.String |
getPlayerName(int index)
Gets payer name by index. |
int |
getPlayerScore(int index)
Gets payer score by index. |
boolean |
isFull()
Checks if this table full. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_SCORES
Constructor Detail |
public CHighScores()
Method Detail |
public int getLength()
public java.lang.String getPlayerName(int index)
index
- an index of a player.public int getPlayerScore(int index)
index
- an index of a player.public int getMinimumScore()
public boolean isFull()
public void clear()
public void addScore(java.lang.String player, int score)
public java.lang.String formatScore(int index, int length)
index
- a score index.length
- a player name length.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |