Class Score
java.lang.Object
spinhex.score.Score
Represents a score in the game, associating a username with a numeric score.
This class is used to track player performance.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Score
public Score()Default constructor that creates an empty Score object. This constructor should be only used implicitly by Jackson for deserialization. -
Score
Creates a Score object with the specified username and score.- Parameters:
username
- the player's usernamescore
- the player's numeric score
-
-
Method Details
-
getUsername
Returns the username associated with this score.- Returns:
- the player's username
-
getScore
public int getScore()Returns the numeric score value.- Returns:
- the player's score
-
equals
Compares this Score object with the specified object for equality. TwoScore
objects are considered equal if they have the same username and score. -
hashCode
-