|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectexample.pushpuzzle.Score
class Score
Keep track of the last level played. For each level keep track of the number of moves.
The scores are kept in a RecordStore named PushPuzzleScores. There are two types of records: - Last level - Level history Name of level (either resource name "/..." or...)
Constructor Summary | |
---|---|
Score()
|
Method Summary | |
---|---|
(package private) void |
close()
Close the store. |
(package private) int |
getLevel()
Retrieve the level from the level record. |
(package private) int |
getMoves()
Get the number of moved on the current level. |
(package private) int |
getPushes()
Get the number of pushes on the current level. |
(package private) int |
getTheme()
Get the current Theme number. |
(package private) boolean |
open()
Open the record store and locate the record with the level number in it. |
(package private) boolean |
readScore(int level)
Read the score for the current level. |
(package private) boolean |
setLevel(int level,
int theme)
Set the level and theme into the RecordStore. |
(package private) boolean |
setLevelScore(int pushes,
int moves)
Set the updated score to the RecordStore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
Score()
Method Detail |
---|
boolean open()
int getTheme()
int getLevel()
boolean setLevel(int level, int theme)
level
- the current leveltheme
- the current themeint getPushes()
int getMoves()
boolean readScore(int level)
boolean setLevelScore(int pushes, int moves)
void close()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |