public abstract class VoxAgentBase extends java.lang.Object implements VoxAgent
Constructor and Description |
---|
VoxAgentBase() |
Modifier and Type | Method and Description |
---|---|
boolean |
buyCastle()
Try to build a castle.
|
void |
buyHalfKnights(int money,
Country baseCountry)
Spend half the money on Knights, then max out pawns
|
void |
buyKnights(int money,
Country baseCountry) |
void |
buyPawns(int money,
Country baseCountry) |
void |
buyUnits(int money) |
void |
buyUnits22(int money,
Country baseCountry)
Buy 2 men, then 2 knights - as much as we can
|
void |
buyUnitsAlternating(int money,
Country baseCountry)
Buy 1 men, then 1 knight - as much as we can
|
boolean |
countryIsInDanger(Country c)
Is the country in danger this turn? WARNING: only looks at distance-1 enemies right now! WARNING: will not consider one-way connections into this country!
|
void |
declareMoves(Country[] countries)
Each turn this method is called for the agent to send his moves to the VoxWorld.
|
java.lang.String |
description()
A description of your agent.
|
Country |
directionToEnemy(Country c)
Calculate the direction to go from here to get to the closest enemy country.
|
int |
distanceToEnemy(Country c)
Calculate the shortest distance to an enemy country.
|
Country |
getBestCastleBuildCountry()
Return a country that we own that it would make sense to build a castle on.
|
float |
getDanger(Country c)
Warning: Counts range 2 enemy pawns as danger at same level.
|
java.util.List |
getEnemyBorders(Country c) |
Country |
getFrontBase()
Return the base closest to the front lines.
|
Country |
getFrontBaseSafe()
Return a base close to the front lines that isn't in danger this turn.
|
float |
getIncome(Country c) |
Country |
getMostValuableEnemyBorder(Country c,
int range)
Return a valuable Enemy neighboring Country within range (max range 2 supported).
|
Country |
getRandomBorder(Country c)
Return a random neighboring Country.
|
Country |
getRandomBorder(Country c,
int range)
Return a random neighboring Country within range (max range 2).
|
Country |
getRandomEnemyBorder(Country c)
Return a random Enemy neighboring Country.
|
java.util.List |
getRealAdjoiningList(java.lang.Object country,
Country[] countryArrayReal)
fix? for reported problem of "fake" countries appearing in adjoiningLists.
|
Country |
getStrongestBase()
Return the base with the most defenders.
|
Country |
getWeakestBase()
Return the base with the least defenders.
|
java.lang.String |
message(java.lang.String message,
java.lang.Object data)
We get notified through this methos when certain things happen.
|
void |
moveTowardsEnemySplittingUp(UnitStack units,
Country from)
Will move all units towards enemies.
|
java.lang.String |
name()
This is the name of your agent.
|
void |
setPrefs(int newID,
VoxWorld theworld)
At the start of the game your agent will be constructed and then the setPrefs() method will be called.
|
float |
version()
The version of your agent.
|
java.lang.String |
youWon()
If your agent wins the game then this method will be called.
|
public boolean buyCastle()
public void buyHalfKnights(int money, Country baseCountry)
public void buyKnights(int money, Country baseCountry)
public void buyPawns(int money, Country baseCountry)
public void buyUnits(int money)
public void buyUnits22(int money, Country baseCountry)
public void buyUnitsAlternating(int money, Country baseCountry)
public boolean countryIsInDanger(Country c)
public void declareMoves(Country[] countries)
VoxAgent
declareMoves
in interface VoxAgent
public java.lang.String description()
VoxAgent
description
in interface VoxAgent
public Country directionToEnemy(Country c)
public int distanceToEnemy(Country c)
public Country getBestCastleBuildCountry()
public float getDanger(Country c)
public java.util.List getEnemyBorders(Country c)
public Country getFrontBase()
public Country getFrontBaseSafe()
public float getIncome(Country c)
public Country getMostValuableEnemyBorder(Country c, int range)
public Country getRandomBorder(Country c, int range)
public Country getRandomEnemyBorder(Country c)
public java.util.List getRealAdjoiningList(java.lang.Object country, Country[] countryArrayReal)
public Country getStrongestBase()
public Country getWeakestBase()
public java.lang.String message(java.lang.String message, java.lang.Object data)
public void moveTowardsEnemySplittingUp(UnitStack units, Country from)
public java.lang.String name()
VoxAgent
public void setPrefs(int newID, VoxWorld theworld)
VoxAgent
public float version()
VoxAgent
public java.lang.String youWon()
VoxAgent
If you think that you will win a lot please provide many different answers for variety.