Package model
Class Score
java.lang.Object
model.Score
Score class for the game
Score-object contains all the information about a single score
it also grades the score based on the time and difficulty
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ModeTypeDifficulty of the scoreprivate final StringGrade of the scoreprivate final intPoints of the scoreprivate final LongId of the score, retrieved from the database.private final DoubleTime of the scoreprivate final DateTimestamp of the scoreprivate final StringUsername of the player -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
username
Username of the player -
scoreid
Id of the score, retrieved from the database. -
time
Time of the score -
difficulty
Difficulty of the score -
timestamp
Timestamp of the score -
grade
Grade of the score -
points
private final int pointsPoints of the score
-
-
Constructor Details
-
Score
Constructor for Score- Parameters:
lb- Leaderboard-object
-
-
Method Details
-
getUsername
getter for username- Returns:
- - see
username
-
getTime
getter for time- Returns:
- - see
time
-
getDifficulty
getter for difficulty- Returns:
- - see
difficulty
-
getGrade
getter for grade- Returns:
- - see
grade
-
getTimestamp
getter for timestamp- Returns:
- - see
timestamp
-
getScoreid
getter for scoreid- Returns:
- - see
scoreid
-
getPoints
public int getPoints()getter for points- Returns:
- - see
points
-
toString
toString method for Score
-