package tests.objects;

import objects.SoccerMatch;

public class GamePercentages {
    float winPercent;
    float drawPercent;
    float lossPercent;

    SoccerMatch match;

    public GamePercentages(float winPercent, float drawPercent, float lossPercent) {
        this.winPercent = winPercent;
        this.drawPercent = drawPercent;
        this.lossPercent = lossPercent;
    }

    public GamePercentages() {

    }

    public SoccerMatch getMatch() {
        return match;
    }

    public void setMatch(SoccerMatch match) {
        this.match = match;
    }

    public void setWinPercent(float winPercent) {
        this.winPercent = winPercent;
    }

    public void setDrawPercent(float drawPercent) {
        this.drawPercent = drawPercent;
    }

    public void setLossPercent(float lossPercent) {
        this.lossPercent = lossPercent;
    }

    public float getWinPercent() {
        return winPercent;
    }

    public float getDrawPercent() {
        return drawPercent;
    }

    public float getLossPercent() {
        return lossPercent;
    }

    @Override
    public String toString() {
        return "Win: " + winPercent + "%, Draw: " + drawPercent + "%, Loss: " + lossPercent + "%";
    }

    public String toOddsString() {
        return (1 / (winPercent)) + ", " + (1 / (drawPercent)) + ", " + (1 / (lossPercent));
    }

    public float getWinOdds() {
        return 1 / winPercent;
    }

    public float getDrawOdds() {
        return 1 / drawPercent;
    }

    public float getLossOdds() {
        return 1 / lossPercent;
    }
}
