Package model

Class Score

java.lang.Object
model.Score

public class Score extends Object
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 Details

    • username

      private final String username
      Username of the player
    • scoreid

      private final Long scoreid
      Id of the score, retrieved from the database.
    • time

      private final Double time
      Time of the score
    • difficulty

      private final ModeType difficulty
      Difficulty of the score
    • timestamp

      private final Date timestamp
      Timestamp of the score
    • grade

      private final String grade
      Grade of the score
    • points

      private final int points
      Points of the score
  • Constructor Details

    • Score

      public Score(Leaderboard lb)
      Constructor for Score
      Parameters:
      lb - Leaderboard-object
  • Method Details

    • getUsername

      public String getUsername()
      getter for username
      Returns:
      - see username
    • getTime

      public Double getTime()
      getter for time
      Returns:
      - see time
    • getDifficulty

      public ModeType getDifficulty()
      getter for difficulty
      Returns:
      - see difficulty
    • getGrade

      public String getGrade()
      getter for grade
      Returns:
      - see grade
    • getTimestamp

      public Date getTimestamp()
      getter for timestamp
      Returns:
      - see timestamp
    • getScoreid

      public Long getScoreid()
      getter for scoreid
      Returns:
      - see scoreid
    • getPoints

      public int getPoints()
      getter for points
      Returns:
      - see points
    • toString

      public String toString()
      toString method for Score
      Overrides:
      toString in class Object
      Returns:
      - see username, scoreid, time, difficulty, timestamp, grade