export class AttackRandomizer {
    #max;
    #last = -1;
    constructor(max = 6) {
        this.#max = max;
    }

    random() {
        let value = Math.round(Math.random()*this.#max);
        while(value == this.#last) {
            value = Math.round(Math.random()*this.#max);
        }
        this.#last = value;
        return value;
    }
}