Constructor and Description |
---|
AIPlayer(java.lang.String name,
int money,
int ore,
int energy)
The is the constructor of the AIPlayer class to instantiate a new instance of the AIPlayer class
|
Modifier and Type | Method and Description |
---|---|
private void |
AIAcquirePlot(Plot[] plots)
Allows the AIPlayer to acquire a random plot given a list of available plots
|
private void |
AIAcquireRoboticon(MarketPlace market)
Allows the AIPlayer to buy a roboticon from the market given.
|
private void |
AIGamble(MarketPlace market)
This allows the AIPlayer to gamble at a pub given a market to go to
|
void |
CompleteTurn(Plot[] plots,
MarketPlace market)
The function for the ai to complete their turn automatically given a list of available plots and the market so that it can interact with them.
|
void |
SellResources(MarketPlace market)
If the player has any resources available it will sell them all to the market given
|
AcquirePlot, addRoboticon, getEnergy, getMoney, getName, getOre, getPlots, getRoboticons, getUnassignedRoboticons, getUnspecialisedRoboticons, ProduceResources, setEnergy, setMoney, setOre, SpecialiseRoboticon
public AIPlayer(java.lang.String name, int money, int ore, int energy)
name
- The name of the aiplayer object i.e Player 1money
- The starting money of the playerore
- The starting ore of the playerenergy
- The starting energy of the playerpublic void CompleteTurn(Plot[] plots, MarketPlace market)
plots
- The list of available plotsmarket
- The market reference to interact withprivate void AIAcquirePlot(Plot[] plots)
plots
- List of available plotsprivate void AIAcquireRoboticon(MarketPlace market)
market
- The market to buy the roboticon fromprivate void AIGamble(MarketPlace market)
market
- The market to access the pubpublic void SellResources(MarketPlace market)
market
- The market to sell the resources to