Browse Source

(BE) update RollStats: set numDice in constructor

tags/v0.2.0
bertieb 3 years ago
parent
commit
f3447efaf2
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/ts/rollstats.ts

+ 4
- 1
src/ts/rollstats.ts View File

@@ -26,8 +26,11 @@ export class RollStats {
maxDice = 10; maxDice = 10;
numDice = 4; numDice = 4;


constructor() {
constructor(numDice?:number) {
this.resetCounts(); this.resetCounts();
if (numDice) {
this.numDice = numDice;
}
} }


resetCounts(): void { resetCounts(): void {


Loading…
Cancel
Save