Package com.deco2800.game.files.stats
Class GameRecords.Records
java.lang.Object
com.deco2800.game.files.stats.GameRecords.Records
- Enclosing class:
- GameRecords
public static class GameRecords.Records
extends java.lang.Object
A mapping of the game number (nth game played) and associated record,
i.e, the score and list of unlocked achievements.
-
Field Summary
Fields Modifier and Type Field Description java.util.Map<java.lang.Integer,GameRecords.Record>
records
An ordered mapping of the game number and associated achievements -
Constructor Summary
Constructors Constructor Description Records()
-
Method Summary
Modifier and Type Method Description void
add(GameRecords.Record record)
Add a new record to the mappingGameRecords.Record
findByGame(int game)
-
Field Details
-
records
An ordered mapping of the game number and associated achievements
-
-
Constructor Details
-
Records
public Records()
-
-
Method Details
-
findByGame
- Parameters:
game
- the game number- Returns:
- records of a particular game (null if absent)
-
add
Add a new record to the mapping- Parameters:
record
- the record to be added
-