summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/dice/ScalarDie.java
blob: bef68e153ae2681199b2d9ce54254c68f29c10f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package bjc.utils.dice;

/**
 * A die that represents a static number
 * 
 * @author ben
 *
 */
public class ScalarDie implements IDiceExpression {
	/**
	 * The represented number
	 */
	private int num;

	@Override
	public int roll() {
		return num;
	}

	/**
	 * Create a dice with the specified number
	 * 
	 * @param num
	 *            The number used for the dice
	 */
	public ScalarDie(int num) {
		this.num = num;
	}

	@Override
	public String toString() {
		return Integer.toString(num);
	}

}