This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
bertieb
/
dice-roller
Watch
1
Star
0
Fork
0
Code
Issues
1
Pull Requests
0
Releases
5
Wiki
Activity
Browse Source
(BE) update RollStats: set numDice in constructor
tags/v0.2.0
bertieb
3 years ago
parent
555375c18d
commit
f3447efaf2
1 changed files
with
4 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-1
src/ts/rollstats.ts
+ 4
- 1
src/ts/rollstats.ts
View File
@@ -26,8 +26,11 @@ export class RollStats {
maxDice = 10;
numDice = 4;
constructor() {
constructor(
numDice?:number
) {
this.resetCounts();
if (numDice) {
this.numDice = numDice;
}
}
resetCounts(): void {
Write
Preview
Loading…
Cancel
Save