From 90d1cc6c9f47f1b6f74fb57e07865795a46c23b8 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 8 Apr 2016 13:29:48 -0400 Subject: Change to data interfaces, as well as prepare to rewrite parser --- .../src/main/java/bjc/dicelang/PolyhedralDice.java | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'dice-lang/src/main/java/bjc/dicelang/PolyhedralDice.java') 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 @@ -18,6 +18,15 @@ public class PolyhedralDice { return new ComplexDice(nDice, 10); } + /** + * Produce a single d10 + * + * @return A single d10 + */ + public static IDiceExpression d10() { + return d10(1); + } + /** * Produce the specified number of 100-sided dice * @@ -29,6 +38,15 @@ public class PolyhedralDice { return new ComplexDice(nDice, 100); } + /** + * Produce a single d100 + * + * @return A single d100 + */ + public static IDiceExpression d100() { + return d100(1); + } + /** * Produce the specified number of 12-sided dice * @@ -40,6 +58,15 @@ public class PolyhedralDice { return new ComplexDice(nDice, 12); } + /** + * Produce a single d12 + * + * @return A single d12 + */ + public static IDiceExpression d12() { + return d12(1); + } + /** * Produce the specified number of 20-sided dice * @@ -51,6 +78,15 @@ public class PolyhedralDice { return new ComplexDice(nDice, 20); } + /** + * Produce a single d20 + * + * @return A single d20 + */ + public static IDiceExpression d20() { + return d20(1); + } + /** * Produce the specified number of 4-sided dice * @@ -62,6 +98,15 @@ public class PolyhedralDice { return new ComplexDice(nDice, 4); } + /** + * Produce a single d4 + * + * @return A single d4 + */ + public static IDiceExpression d4() { + return d4(1); + } + /** * Produce the specified number of 6-sided dice * @@ -73,6 +118,15 @@ public class PolyhedralDice { return new ComplexDice(nDice, 6); } + /** + * Produce a single d6 + * + * @return A single d6 + */ + public static IDiceExpression d6() { + return d6(1); + } + /** * Produce the specified number of 8-sided dice * @@ -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); + } } -- cgit v1.2.3