summaryrefslogtreecommitdiff
path: root/dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-04-08 13:29:48 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-04-08 13:29:48 -0400
commit90d1cc6c9f47f1b6f74fb57e07865795a46c23b8 (patch)
treeb74cd5b9989c9f5a1bbde1e1b8c751faf9cb7086 /dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java
parentb1df3ff8c890bf6d4cc16fb4f28ddb7833512d71 (diff)
Change to data interfaces, as well as prepare to rewrite parser
Diffstat (limited to 'dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java')
-rw-r--r--dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java b/dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java
index e0bef64..9f609b4 100644
--- a/dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java
+++ b/dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java
@@ -19,6 +19,15 @@ public class PolyhedralDice {
}
/**
+ * Produce a single d10
+ *
+ * @return A single d10
+ */
+ public static IDiceExpression d10() {
+ return d10(1);
+ }
+
+ /**
* Produce the specified number of 100-sided dice
*
* @param nDice
@@ -30,6 +39,15 @@ public class PolyhedralDice {
}
/**
+ * Produce a single d100
+ *
+ * @return A single d100
+ */
+ public static IDiceExpression d100() {
+ return d100(1);
+ }
+
+ /**
* Produce the specified number of 12-sided dice
*
* @param nDice
@@ -41,6 +59,15 @@ public class PolyhedralDice {
}
/**
+ * Produce a single d12
+ *
+ * @return A single d12
+ */
+ public static IDiceExpression d12() {
+ return d12(1);
+ }
+
+ /**
* Produce the specified number of 20-sided dice
*
* @param nDice
@@ -52,6 +79,15 @@ public class PolyhedralDice {
}
/**
+ * Produce a single d20
+ *
+ * @return A single d20
+ */
+ public static IDiceExpression d20() {
+ return d20(1);
+ }
+
+ /**
* Produce the specified number of 4-sided dice
*
* @param nDice
@@ -63,6 +99,15 @@ public class PolyhedralDice {
}
/**
+ * Produce a single d4
+ *
+ * @return A single d4
+ */
+ public static IDiceExpression d4() {
+ return d4(1);
+ }
+
+ /**
* Produce the specified number of 6-sided dice
*
* @param nDice
@@ -74,6 +119,15 @@ public class PolyhedralDice {
}
/**
+ * Produce a single d6
+ *
+ * @return A single d6
+ */
+ public static IDiceExpression d6() {
+ return d6(1);
+ }
+
+ /**
* Produce the specified number of 8-sided dice
*
* @param nDice
@@ -83,4 +137,13 @@ public class PolyhedralDice {
public static IDiceExpression d8(int nDice) {
return new ComplexDice(nDice, 8);
}
+
+ /**
+ * Produce a single d8
+ *
+ * @return A single d8
+ */
+ public static IDiceExpression d8() {
+ return d8(1);
+ }
}