m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-19 22:38:24 -0400
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-19 23:14:36 -0400
commitba07c4d236d2a03f5f7647cf4e724f853703172f (patch)
tree8d1c4baa59a0ee22e8448157eb3b8e43ed361225 /src
parent3d394316505d7c64975e1d5a9d1e04b8da1903c3 (diff)
Create failing explode tests
Diffstat (limited to 'src')
-rw-r--r--src/dice.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dice.js b/src/dice.js
index 1587eef..cbc7325 100644
--- a/src/dice.js
+++ b/src/dice.js
@@ -41,6 +41,12 @@ const subtract = (die1, die2) => {
}
}
+const explode = (die1, die2) => {
+ return () => {
+ return die1()
+ }
+}
+
exports.pool = pool
exports.roll = roll
exports.constant = constant
@@ -48,3 +54,4 @@ exports.d = d
exports.add = add
exports.subtract = subtract
exports.negative = negative
+exports.explode = explode