package org.codecritters.code_critters.web.dto;

/*-
 * #%L
 * Code Critters
 * %%
 * Copyright (C) 2019 Michael Gruber
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/gpl-3.0.html>.
 * #L%
 */

public class ScoreDTO {

    private String user;
    private int score;
    private int levels;
    private int position;

    /**
     * Used to retrieve score information to be displayed in the highscore table.
     * @param user The user achieving the score.
     * @param score The scores summed up over all levels played.
     * @param levels The number of levels played.
     * @param position The overall position in the user ranking based on the achieved score.
     */
    public ScoreDTO(String user, int score, int levels, int position) {
        this.user = user;
        this.score = score;
        this.levels = levels;
        this.position = position;
    }

    public ScoreDTO(String user, int score, int levels) {
        this.user = user;
        this.score = score;
        this.levels = levels;
    }

    public ScoreDTO() {
    }

    public ScoreDTO(String user) {
        this.user = user;
        this.score = 0;
        this.levels = 0;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int getLevels() {
        return levels;
    }

    public void setLevels(int levels) {
        this.levels = levels;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }
}
