BasicGatheringCoordinator

public class BasicGatheringCoordinator implements Serializable

A basic AI that does simple commanding of gatherer units

Constructors

BasicGatheringCoordinator

public BasicGatheringCoordinator(int playerID, Random r)

Methods

assignActions

public void assignActions(StateView state, RelevantStateView relstate, Map<Integer, Action> actions)

Adds gather/deposit actions to the given action map for units previously specified as miners or lumberjacks.

Parameters:
  • state
  • relstate
  • actions

assignGold

public void assignGold(Integer unitID)

assignIdle

public void assignIdle(Integer unitID)

assignOther

public void assignOther(Integer unitID, Action assignment)

assignWood

public void assignWood(Integer unitID)

getGoldWorker

public Integer getGoldWorker()

getIdleWorker

public Integer getIdleWorker()

getVerbose

public boolean getVerbose()

getWoodWorker

public Integer getWoodWorker()

hasGoldWorker

public boolean hasGoldWorker(Integer id)

hasIdleWorker

public boolean hasIdleWorker(Integer id)

hasOtherWorker

public boolean hasOtherWorker(Integer id)

hasWoodWorker

public boolean hasWoodWorker(Integer id)

numGoldWorkers

public int numGoldWorkers()

numIdleWorkers

public int numIdleWorkers()

numWoodWorkers

public int numWoodWorkers()

removeUnit

public void removeUnit(Integer unitID)

setVerbose

public void setVerbose(boolean verbosity)