summaryrefslogtreecommitdiff
path: root/dice-lang/src/bjc/dicelang/dice/DieList.java
blob: 5454759f965283383f6af7ce1fd186932dfcdeab (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
package bjc.dicelang.dice;

/**
 * Represents a group of dice.
 *
 * @author Ben Culkin.
 */
public interface DieList {
	/**
	 * Can this list be optimized?
	 *
	 * @return Whether or not this list cna be optimized.
	 */
	boolean canOptimize();
	/**
	 * Optimize this list, if it can be done.
	 *
	 * Invoking this on unoptimizable expression is undefined.
	 *
	 * @return The optimized form of this list.
	 */
	long[]  optimize();

	/**
	 * Roll this group of dice.
	 *
	 * @param A possible roll of this group.
	 */
	long[] roll();
}