Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.dndmud.dice;
- import java.util.*;
- public class Dicedriver {
- public static void main(String[] args) {
- if (args[0] == "help" && args.length == 0 || args[0] == "/help" && args.length == 0 || args.length < 1 ) {
- System.out.println("\r\nDice Roll Needs 2 Arguments");
- System.out.println("\r\njava dice x y'");
- System.out.println("\r\nWhere x is the amount of dice you wish to roll, and y is the amount of sides on the die/dice");
- System.exit(0);
- }
- int num = Integer.parseInt(args[0]);
- int size = Integer.parseInt(args[1]);
- System.out.println("Rolling "+ num + "d" + size);
- List<Integer> list2 = new com.dndmud.dice.Dice(size,num);
- if (num == 1) {
- System.out.println("Your Rolled a " + list2.get(0));
- }
- else {
- System.out.print("Your Rolled a " + list2.get(0) + " ");
- list2.remove(0);
- System.out.print(list2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment