-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDice.java
44 lines (43 loc) · 1.66 KB
/
Dice.java
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
36
37
38
39
40
41
42
43
44
//RailBarronAssistant Dice.java 06/12/2006
package railbarron;
/**
* Roll 6 sided dice for the game.
* <P>
* <TABLE BORDER="0">
* <TR> <TD><H4>Dice.java</H4></TD>
* <TD><FONT SIZE=-2>Copyright 2006 Tower Games All Rights Reserved.
* <BR>CopyrightVersion 1.0 6/December/2006</FONT></TD></TR>
* <TR><TD><TABLE BORDER="0">
* <TR><TD><FONT SIZE=-2><p><b>History</b></TD></TR>
* <TR><TD><FONT SIZE=-2>2006 12 06</FONT></TD><TD><FONT SIZE=-2>1.0 Created</FONT></TD></TR>
* </TABLE></TD>
* <TD><TABLE BORDER="1"><TR><TD><FONT SIZE=-2>
* This source code and any code generated from it by compilation
* is the confidential and proprietary information of Tower Games
* ("Confidential Information"). You shall not disclose such Confidential Information and
* shall use it only in accordance with the terms of the license agreement you entered into
* with Tower Games
* <BR>Tower Games makes no representations or warranties about the siutability of this
* source code or any code generated from it by compilation, either expressed or implied, including
* (but not limited to) the implied warranties of merchantability, fitness for a particular purpose,
* or non-infringement. Tower Games shall not be liable for any damages suffered
* by the licensee as a result of using, modifying or distributing this source code or its derivatives
* or any code generated from it by compilation.
* </FONT></TD></TR></TABLE></TD></TR>
*
* </TABLE>
* @author Danny Stevens
* @version 1.0
*/
public final class Dice {
/**
* Return a random number from 1 to 6.
* <P>
* @return
*/
public static int roll() {
int roll = (int)(Math.random() * 6);
return roll%6 + 1;
}
}
// End Dice