uk.org.redfelineninja.risk.server
Class Dice
java.lang.Object
|
+--uk.org.redfelineninja.risk.server.Dice
- public class Dice
- extends java.lang.Object
This class implements tha dice battling mechanism of risk.
Method Summary |
int |
attack(uk.org.redfelineninja.risk.server.RiskEngine.Country att,
int attDice,
uk.org.redfelineninja.risk.server.RiskEngine.Country def,
int defDice)
|
int |
bestAttack(uk.org.redfelineninja.risk.server.RiskEngine.Country att,
uk.org.redfelineninja.risk.server.RiskEngine.Country def)
|
static void |
main(java.lang.String[] args)
|
int[] |
rollDice(int n)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OK
public static final int OK
- See Also:
- Constant Field Values
CANT_ATTACK
public static final int CANT_ATTACK
- See Also:
- Constant Field Values
ILLEGAL_ATTACK
public static final int ILLEGAL_ATTACK
- See Also:
- Constant Field Values
Dice
public Dice(RiskClientInterface c)
main
public static void main(java.lang.String[] args)
rollDice
public int[] rollDice(int n)
bestAttack
public int bestAttack(uk.org.redfelineninja.risk.server.RiskEngine.Country att,
uk.org.redfelineninja.risk.server.RiskEngine.Country def)
attack
public int attack(uk.org.redfelineninja.risk.server.RiskEngine.Country att,
int attDice,
uk.org.redfelineninja.risk.server.RiskEngine.Country def,
int defDice)