package sample;

import java.io.*;
import java.util.ArrayList;

public class Database implements Serializable {

    private int maxScore;
    private static Database db;

    private final ArrayList<DataTable> databaseFiles;

    public Database() {
        this.maxScore = 1;
        databaseFiles = new ArrayList<DataTable>();
    }

    public int getMaxScore() {
        return maxScore;
    }

    public void setMaxScore(int maxLevel) {
        if (this.maxScore < maxLevel) this.maxScore = maxLevel;
    }

    public void addData(DataTable d) {
        databaseFiles.add(d);
    }

    public void removeData(DataTable d) {
        databaseFiles.remove(d);
    }

    public static void resetScore() {
        db = new Database();
    }

    public ArrayList<DataTable> getDatabaseFiles() {
        return databaseFiles;
    }
}