summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-02-21 15:40:30 -0500
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-02-21 15:40:30 -0500
commit77a797089a2e065cc8cf2a83ae8356b16591aebe (patch)
treee88f80b126cbb6de08881beb0a8c97111966a2b7 /BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java
parentd8b3b3c5e4441cecec98c06a36fc81570008c888 (diff)
Revamping of the way dice work
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java95
1 files changed, 75 insertions, 20 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java b/BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java
index a8bebe6..0ce483a 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/dice/PolyhedralDice.java
@@ -1,31 +1,86 @@
package bjc.utils.dice;
+/**
+ * Class that produces common polyhedral dice
+ *
+ * @author ben
+ *
+ */
public class PolyhedralDice {
- public static Dice d10(int nDice) {
- return new Dice(nDice, 10);
+ /**
+ * Produce the specified number of 10-sided dice
+ *
+ * @param nDice
+ * The number of ten-sided dice to produce
+ * @return A group of ten-sided dice of the specified size
+ */
+ public static LazyDice d10(int nDice) {
+ return new LazyDice(nDice, 10);
}
-
- public static Dice d100(int nDice) {
- return new Dice(nDice, 100);
+
+ /**
+ * Produce the specified number of 100-sided dice
+ *
+ * @param nDice
+ * The number of hundred-sided dice to produce
+ * @return A group of hundred-sided dice of the specified size
+ */
+ public static LazyDice d100(int nDice) {
+ return new LazyDice(nDice, 100);
}
-
- public static Dice d12(int nDice) {
- return new Dice(nDice, 12);
+
+ /**
+ * Produce the specified number of 12-sided dice
+ *
+ * @param nDice
+ * The number of twelve-sided dice to produce
+ * @return A group of twelve-sided dice of the specified size
+ */
+ public static LazyDice d12(int nDice) {
+ return new LazyDice(nDice, 12);
}
-
- public static Dice d20(int nDice) {
- return new Dice(nDice, 20);
+
+ /**
+ * Produce the specified number of 20-sided dice
+ *
+ * @param nDice
+ * The number of twenty-sided dice to produce
+ * @return A group of twenty-sided dice of the specified size
+ */
+ public static LazyDice d20(int nDice) {
+ return new LazyDice(nDice, 20);
}
-
- public static Dice d4(int nDice) {
- return new Dice(nDice, 4);
+
+ /**
+ * Produce the specified number of 10-sided dice
+ *
+ * @param nDice
+ * The number of ten-sided dice to produce
+ * @return A group of ten-sided dice of the specified size
+ */
+ public static LazyDice d4(int nDice) {
+ return new LazyDice(nDice, 4);
}
-
- public static Dice d6(int nDice) {
- return new Dice(nDice, 6);
+
+ /**
+ * Produce the specified number of 10-sided dice
+ *
+ * @param nDice
+ * The number of ten-sided dice to produce
+ * @return A group of ten-sided dice of the specified size
+ */
+ public static LazyDice d6(int nDice) {
+ return new LazyDice(nDice, 6);
}
-
- public static Dice d8(int nDice) {
- return new Dice(nDice, 8);
+
+ /**
+ * Produce the specified number of 10-sided dice
+ *
+ * @param nDice
+ * The number of ten-sided dice to produce
+ * @return A group of ten-sided dice of the specified size
+ */
+ public static LazyDice d8(int nDice) {
+ return new LazyDice(nDice, 8);
}
}