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.


Field Summary
static int CANT_ATTACK
           
static int ILLEGAL_ATTACK
           
static int OK
           
 
Constructor Summary
Dice(RiskClientInterface c)
           
 
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
 

Field Detail

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
Constructor Detail

Dice

public Dice(RiskClientInterface c)
Method Detail

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)