public class AiPlayer extends Player
Modifier and Type | Field and Description |
---|---|
private static java.util.Random |
rnd |
Constructor and Description |
---|
AiPlayer(int i) |
Modifier and Type | Method and Description |
---|---|
double |
calculateLikelihood(double marketPrice,
double offerPrice)
Calculates a value for the likelihood of the AI accepting a trade.
|
boolean |
isAi() |
void |
performPhase(GameEngine engine,
GameScreen screen)
Called by GameEngine to get the AI player's action, according to the current phase in the game engine
|
assignCollege, assignName, assignTile, calculateScore, decreaseRoboticonInventory, getCollege, getEnergyCount, getFoodCount, getInventoryRoboticons, getMoney, getName, getOreCount, getPlayerID, getPlayerNumber, getRoboticonInventory, getTileList, getTrade, increaseRoboticonInventory, setEnergyCount, setFoodCount, setMoney, setOreCount, setTrade, toggleActive, varyResource
public void performPhase(GameEngine engine, GameScreen screen)
engine
- The game enginescreen
- The game screenpublic double calculateLikelihood(double marketPrice, double offerPrice)
marketPrice
- The current price of a certain resource at the marketofferPrice
- The proce another player has offered for the resource