public class ScoreLoader
extends java.lang.Object
| Constructor | Description |
|---|---|
ScoreLoader(java.lang.String filePath) |
Constructor to create an object of class ScoreLoader
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.ArrayList<java.lang.Integer> |
loadScores() |
Scans the save file and assigns its values into an ArrayList
|
void |
resetScores() |
Deletes the save file
|
void |
saveScore(java.util.ArrayList<java.lang.Integer> scores) |
Rewrites the save file using the list of scores given
|
void |
writeScore(int... scores) |
Saves multiple scores into the save file
|
public ScoreLoader(java.lang.String filePath)
filePath - File path of the file the ScoreLoader will read and load frompublic java.util.ArrayList<java.lang.Integer> loadScores()
public void saveScore(java.util.ArrayList<java.lang.Integer> scores)
scores - An ArrayList containing all the scores to be writtenpublic void writeScore(int... scores)
scores - Scores to be savedpublic void resetScores()