summaryrefslogtreecommitdiff
path: root/dice-lang/src/bjc/dicelang/examples/DiceExpressionParserTest.java
diff options
context:
space:
mode:
authorbjculkin <bjculkin@WIT-136XG42.wvu-ad.wvu.edu>2017-02-27 10:08:50 -0500
committerbjculkin <bjculkin@WIT-136XG42.wvu-ad.wvu.edu>2017-02-27 10:08:50 -0500
commit79ee129fc0d36ad10bceb942262f2842419c030c (patch)
treed1298fdb8b81726f4b9012d7a29c3029a55a3aa7 /dice-lang/src/bjc/dicelang/examples/DiceExpressionParserTest.java
parentc50a0744269ce22604c0604cc69e6d5e5ce8a3fc (diff)
Pacakge reorganization
Diffstat (limited to 'dice-lang/src/bjc/dicelang/examples/DiceExpressionParserTest.java')
-rw-r--r--dice-lang/src/bjc/dicelang/examples/DiceExpressionParserTest.java59
1 files changed, 0 insertions, 59 deletions
diff --git a/dice-lang/src/bjc/dicelang/examples/DiceExpressionParserTest.java b/dice-lang/src/bjc/dicelang/examples/DiceExpressionParserTest.java
deleted file mode 100644
index b31f3a0..0000000
--- a/dice-lang/src/bjc/dicelang/examples/DiceExpressionParserTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package bjc.dicelang.examples;
-
-import java.util.HashMap;
-import java.util.Scanner;
-
-import bjc.dicelang.DiceExpressionParser;
-import bjc.dicelang.IDiceExpression;
-
-/**
- * Driver class for testing expression parser
- *
- * @author ben
- *
- */
-public class DiceExpressionParserTest {
- /**
- * Run the parser test
- *
- * @param args
- * Unused CLI arguments
- */
- public static void main(String[] args) {
- /*
- * Get a scanner for input
- */
- Scanner scn = new Scanner(System.in);
-
- /*
- * Ask to enter a expression
- */
- System.out.print("Enter dice expression: ");
-
- String exp = scn.nextLine();
-
- /*
- * Enter amount of times to roll an expression
- */
- System.out.print("Enter number of times to roll: ");
-
- int nTimes = Integer.parseInt(scn.nextLine());
-
- IDiceExpression dexp = DiceExpressionParser.parse(exp,
- new HashMap<>());
-
- /*
- * Roll the dice a specified amount of times
- */
- for (int i = 1; i <= nTimes; i++) {
- int roll = dexp.roll();
-
- System.out.println("Rolled " + roll);
- }
-
- /*
- * Clean up after ourselves
- */
- scn.close();
- }
-}