package pp.monopoly.message.server;

import java.util.List;

public class DiceResult extends ServerMessage{

    private List<Integer> rollResult;

    public DiceResult(List<Integer> rollResult) {
        this.rollResult = rollResult;
    }

    public List<Integer> getRollResult() {
        return rollResult;
    }

    @Override
    public void accept(ServerInterpreter interpreter) {
        interpreter.received(this);
    }

    @Override
    public String getInfoTextKey() {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'getInfoTextKey'");
    }

    public boolean isDoublets() {
        return rollResult.get(0) == rollResult.get(1);
    }

    public int calcTotal() {
        return rollResult.get(0)+rollResult.get(1);
    }
}
