|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--HighScoresList
The HighScoresList class is a list of the top 15 scores achieved during the play of Sokoban.
Constructor Summary | |
HighScoresList(boolean junit)
Constructor - initializes the scores vector. |
|
HighScoresList(Game game)
Constructor - initializes the scores vector. |
Method Summary | |
void |
addHighScore(HighScore score)
The addScores method allows the user to add scores to the high scores list. |
void |
clearHighScores()
The clearHighScores method allows the user to clear the current list of high scores. |
void |
loadHighScores()
The loadHighScores method allows the user to load the scores from a file. |
protected HighScore[] |
toArray()
Returns the High Scores List as an array of HighScores. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HighScoresList(Game game)
public HighScoresList(boolean junit)
Method Detail |
public void loadHighScores()
Precondition: high scores file exists
Postcondition:The list of high scores is loaded to be viewed
by the user
public void addHighScore(HighScore score)
score
- a HighScore class with name and score to be added to the high scores list
Precondition:Checks to see if the file have space for name and score entry
Postcondition:The added name and score will be saved in the high
scores list.
public void clearHighScores()
protected HighScore[] toArray()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |