using System;

public class Die {

    int sides;
    Random rnd = new Random();

    private int modifier;
    public int Modifier { get => modifier; set => modifier = value; }

    public Die(int sides) {
        this.sides = sides;
    }

    public int RollDie() {
        return rnd.Next(1, sides) + Modifier;
    }
}