Advertisement
Guest User

Untitled

a guest
Apr 24th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.11 KB | None | 0 0
  1. import java.util.Random;
  2.  
  3. public class DiceHelper {
  4.    
  5.     private static final Random rng = new Random();
  6.    
  7.     public static void main(String[] args) {
  8.         // use for testing purposes
  9.     }
  10.    
  11.     /**
  12.      * Returns the result of rolling a dice with s sides.
  13.      * @param sides     the number of sides on the dice
  14.      * @return          the sum of dice rolled
  15.      */
  16.     public static int roll(int sides) {
  17.         // your code here
  18.     }
  19.    
  20.     /**
  21.      * Returns the sum of rolling n dice with s sides.
  22.      *
  23.      * @param sides     the number of sides on each dice to roll
  24.      * @param numRolls  the number of dice to roll
  25.      * @return          the sum of dice rolled
  26.      */
  27.     public static int roll(int sides, int numRolls) {
  28.         // your code here
  29.     }
  30.    
  31.     /**
  32.      * Returns the sum of rolling n dice with s sides
  33.      * and adds m to the result of each roll.
  34.      *
  35.      * @param sides     the number of sides on each dice to roll
  36.      * @param numRolls  the number of dice to roll
  37.      * @param modifier  the amount to add to the result of each dice roll
  38.      * @return          the sum of dice rolled
  39.      */
  40.     public static int roll(int sides, int numRolls, int modifier) {
  41.         // your code here
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement