package eu.midnightdust.yaytris;

import eu.midnightdust.yaytris.util.NightJson;

import java.util.HashMap;
import java.util.Map;

public class HighScores {
    private static final NightJson json = new NightJson(HighScores.class, "tetris_scores.json5");
    public static Map<String, Integer> scores = new HashMap<>();

    public static void addScore(String playerName, int score) {
        scores.put(playerName, score);
        write();
    }

    public static void load() {
        json.readJson();
    }

    public static void write() {
        json.writeJson();
    }
}
