public static void addScore(int difficulty, String name, long time) {
        String[] names;
        long[] times;
        switch (difficulty) {
            case Grid.DIFFICULTY_EASY:
                names = instance.easyName;
                times = instance.easyTime;
                break;
            case Grid.DIFFICULTY_MEDIUM:
                names = instance.mediumName;
                times = instance.mediumTime;
                break;
            case Grid.DIFFICULTY_HARD:
                names = instance.hardName;
                times = instance.hardTime;
                break;
            case Grid.DIFFICULTY_EXTREME:
                names = instance.extremeName;
                times = instance.extremeTime;
                break;
            default: return;
        }
        
        if (times[times.length - 1] < time) {
            return;
        }
        
        int place = times.length - 1;
        while (true) {
            if (place < times.length - 1) {
                times[place + 1] = times[place];
                names[place + 1] = names[place];
            }
            if (times[place] < time) {
                place++;
                break;
            }
            place--;
            if (place == -1) {
                place = 0;
                break;
            }
        }
        times[place] = time;
        names[place] = name;
        
        save();
    }