Constructor and Description |
---|
Quo() |
Modifier and Type | Method and Description |
---|---|
void |
attackPhase()
The attackPhase method is called at the start of the agent's attack-phase (duh).
|
void |
cardsPhase(Card[] cards)
The cardsPhase method is called at the very beginning of your agent's turn.
|
java.lang.String |
description()
A description of your agent.
|
java.lang.String |
name()
This is the name of your agent.
|
java.lang.String |
youWon()
If your agent wins the game then this method will be called.
|
pickCountry
fortifyPhase, moveArmiesIn, placeArmies, version
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 void cardsPhase(Card[] cards)
LuxAgent
If your agent ever returns from the cardsPhase() method and still has more than 5 cards,
enough sets will be automatically cashed to bring you to under five cards.
cardsPhase
in interface LuxAgent
cardsPhase
in class SmartAgentBase
public java.lang.String description()
LuxAgent
description
in interface LuxAgent
description
in class Shaft
public java.lang.String name()
LuxAgent
public java.lang.String youWon()
LuxAgent
If you think that you will win a lot feel free to provide many different answers for variety.