|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Country
Country interface
| Method Summary | |
|---|---|
AttackResult |
attack(Direction direction,
int numberOfUnits)
Takes a turn for this country, performing an attack |
void |
build()
Takes a turn for this country, performing a build, adds one unit to this countries force |
int |
canAcceptUnits()
Checks to how many units this country can accept |
int |
getIndex()
This country's index |
int |
getLastTurnPerformed()
The last turn that was performed on this country |
java.lang.String |
getName()
This country's name |
int |
getNumberOfUnits()
Returns the number of units in this country |
boolean |
isOccupyingForce(Player occupyingForce)
Checks to see if the passed player is the occupying force in this country |
int |
leftCanAcceptUnits()
Checks to see how many units the country to the left can accept, returns 0 if the country is unfriendly |
boolean |
leftIsFriendly()
Checks to see if the country to the left is friendly |
int |
rightCanAcceptUnits()
Checks to see how many units the country to the right can accept, returns 0 if the country is unfriendly |
boolean |
rightIsFriendly()
Checks to see if the country to the right is friendly |
int |
scout(Direction direction)
Takes a turn for this country, performing a scout action |
void |
transfer(Direction direction,
int numberOfUnits)
Takes a turn for this country, performing a transfer |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
boolean leftIsFriendly()
boolean rightIsFriendly()
int canAcceptUnits()
int leftCanAcceptUnits()
int rightCanAcceptUnits()
int getNumberOfUnits()
int getLastTurnPerformed()
boolean isOccupyingForce(Player occupyingForce)
occupyingForce -
java.lang.String getName()
int getIndex()
AttackResult attack(Direction direction,
int numberOfUnits)
throws AttackActionException,
CheatingException,
TurnTimedOutException
direction - Direction to attack innumberOfUnits - the number of units to attack with
AttackActionException
TurnTimedOutException
CheatingException
void build()
throws BuildActionException,
CheatingException,
TurnTimedOutException
BuildActionException
CheatingException
TurnTimedOutException
blindrisk.exceptions.BuildActionException - thrown if there would be
too many units in the country.
blindrisk.exceptions.CheatingException - thrown if the country is not
yours or if it's already had a turn taken on this go
void transfer(Direction direction,
int numberOfUnits)
throws TransferActionException,
CheatingException,
TurnTimedOutException
direction - the direction to transfer innumberOfUnits - the number of units to transfer
TransferActionException
CheatingException
blindrisk.exceptions.TurnTimedOutException - Thrown if this turn has
timed out.
TurnTimedOutException
int scout(Direction direction)
throws ScoutActionException,
CheatingException,
TurnTimedOutException
direction - the direction to scout in
ScoutActionException
blindrisk.exceptions.ScoutActionException - Thrown if your country
has attempted to scout itself
CheatingException
TurnTimedOutException
blindrisk.exceptions.CheatingException - thrown if the country is not
yours or if it's already had a turn taken on this go
blindrisk.exceptions.TurnTimedOutException - Thrown if this turn has
timed out.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||