Class GameRecords.Score

java.lang.Object
com.deco2800.game.files.stats.GameRecords.Score
Enclosing class:
GameRecords

public static class GameRecords.Score
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    java.lang.String dateTime
    Time when the game ended, i.e, the player died.
    double distance
    Distance of that particular game
    int game
    The game number, for ease of access
    int score
    Score of that particular game
  • Constructor Summary

    Constructors 
    Constructor Description
    Score()  
  • Method Summary

    Modifier and Type Method Description
    java.time.LocalDateTime getDateTime()
    Returns local date and time object of when the game ended, i.e, the time of player's death.
    java.lang.Integer getScore()
    In game score

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • score

      public int score
      Score of that particular game
    • distance

      public double distance
      Distance of that particular game
    • game

      public int game
      The game number, for ease of access
    • dateTime

      public java.lang.String dateTime
      Time when the game ended, i.e, the player died.
  • Constructor Details

  • Method Details

    • getDateTime

      public java.time.LocalDateTime getDateTime()
      Returns local date and time object of when the game ended, i.e, the time of player's death.

      LocalDateTime objects are easier to work with. Parse the given dateTime string into a LocalDateTime object.

      Note: This could be mapped to the JSON but the FileLoader gives SEVERE type errors when reading the file.

      Returns:
      LocalDateTime object of the dateTime property
    • getScore

      public java.lang.Integer getScore()
      In game score
      Returns:
      the score of the particular game