Constructor and Description |
---|
Yakool() |
Modifier and Type | Method and Description |
---|---|
void |
attackPhase()
The attackPhase method is called at the start of the agent's attack-phase (duh).
|
java.lang.String |
description()
A description of your agent.
|
java.lang.String |
name()
This is the name of your agent.
|
void |
placeArmies(int numberOfArmies)
Every turn, each agent gets some armies to place on its countries.
|
java.lang.String |
youWon()
If your agent wins the game then this method will be called.
|
fortifyPhase, moveArmiesIn, pickCountry, version
cardsPhase, cashCardsIfPossible, debug, message, placeInitialArmies, setPrefs
public void attackPhase()
LuxAgent
They have slightly different parameters, but you always provide
1. The country where you are attacking from (a country you own with at least 2 armies),
2. The country where you are attacking to (an enemy country that can be reached from
where you are attacking from),
3. The number of dice you want to attack with (1, 2, or 3 - and you must have at least (dice+1)
armies in the country you are attacking from).
4. Whether you want to repeat the attack until someone wins or not (a false value means just
one dice roll, a true value means keep attacking till someone is wiped out).
The Board's attack() method returns symbolic ints, as follows:
- a negative return means that you supplied incorrect parameters.
- 0 means that your single attack call has finished, with no one being totally defeated. Armies may have been lost from either country.
- 7 means that the attacker has taken over the defender's country.
NOTE: before returning 7, board will call moveArmiesIn() to poll you on how many armies to move into the taken over country.
- 13 means that the defender has fought off the attacker (the attacking country has only 1 army left).
attackPhase
in interface LuxAgent
attackPhase
in class Cluster
public java.lang.String description()
LuxAgent
description
in interface LuxAgent
description
in class Cluster
public java.lang.String name()
LuxAgent
public void placeArmies(int numberOfArmies)
LuxAgent
placeArmies
in interface LuxAgent
placeArmies
in class Cluster
public java.lang.String youWon()
LuxAgent
If you think that you will win a lot feel free to provide many different answers for variety.