#include <ai.h>
Inheritance diagram for AI:

Public Member Functions | |
| AI (GameMap *_map, int _player) | |
| void | run (MapDisplayInterface *mapDisplay) |
| void | run (bool benchmark, MapDisplayInterface *mapDisplay) |
| starts the Ai. If benchmark is true, the AI might take longer since it is not time limited, it won't display any graphics and will output the time it needed to run completely | |
| GameMap * | getMap (void) |
| returns the map this AI runson | |
| int | getPlayerNum (void) |
| returns the number of the player which is controlled by this ai | |
| Player & | getPlayer (void) |
| Player & | getPlayer (int player) |
| Player & | getPlayer (PlayerID id) |
| void | showFieldInformation (int x, int y) |
| bool | isRunning (void) |
| VisibilityStates | getVision (void) |
| the AI uses a different vision than human player, to counter the fact that a human player can "know" a map and take a look before starting to play. | |
| void | read (tnstream &stream) |
| void | write (tnstream &stream) const |
| Context | getContext () |
| ~AI () | |
Static Public Member Functions | |
| static bool | moveVariantComp (const AI::MoveVariant *mv1, const AI::MoveVariant *mv2) |
Friends | |
| class | ServiceOrder |
| class | RefuelConstraint |
| class | CheckFieldRecon |
| class | BuildingValueComp |
| class | CalculateThreat_Vehicle |
| class | VehicleTypeEfficiencyCalculator |
| class | Section |
| class | Sections |
Classes | |
| class | AiResult |
| class | BuildingCapture |
| class | BuildingValueComp |
| class | CheckFieldRecon |
| struct | Config |
| class | FieldInformation |
| class | MoveVariant |
| struct | ProductionRating |
| class | RefuelConstraint |
| class | Section |
| class | Sections |
| class | ServiceOrder |
| class | ServiceTargetEquals |
| class | TargetVector |
| class | UnitDistribution |
| class | VehicleTypeEfficiencyCalculator |
| class | WeaponThreatRange |
Definition at line 44 of file ai.h.
| bool AI::moveVariantComp | ( | const AI::MoveVariant * | mv1, | |
| const AI::MoveVariant * | mv2 | |||
| ) | [static] |
Definition at line 178 of file tactics.cpp.
| void AI::run | ( | MapDisplayInterface * | mapDisplay | ) | [inline, virtual] |
| void AI::run | ( | bool | benchmark, | |
| MapDisplayInterface * | mapDisplay | |||
| ) |
starts the Ai. If benchmark is true, the AI might take longer since it is not time limited, it won't display any graphics and will output the time it needed to run completely
Definition at line 232 of file base.cpp.
References checkforvictory(), displaymessage(), displaymessage2(), getMap(), CGameOptions::Instance(), repaintMap, ticker, and visible_ago.
| GameMap* AI::getMap | ( | void | ) | [inline] |
returns the map this AI runson
Definition at line 496 of file ai.h.
Referenced by CalculateThreat_VehicleType::calc_threat_vehicletype(), getContext(), HiddenAStar3D::getMoveCost(), HiddenAStar::getMoveCost(), AntiMineAStar3D::getMoveCost(), StratAStar3D::getMoveCost(), StratAStar::getMoveCost(), getPlayer(), run(), showFieldInformation(), and UnitAttacksUnit_FakeHemming::UnitAttacksUnit_FakeHemming().
| int AI::getPlayerNum | ( | void | ) | [inline] |
returns the number of the player which is controlled by this ai
Definition at line 499 of file ai.h.
Referenced by CalculateThreat_Vehicle::calc_threat_vehicle(), HiddenAStar3D::getMoveCost(), HiddenAStar::getMoveCost(), showFieldInformation(), and SearchReconquerBuilding::unitfound().
| Player& AI::getPlayer | ( | void | ) | [inline] |
Definition at line 501 of file ai.h.
References getMap(), and GameMap::player.
Referenced by getContext(), and SearchReconquerBuilding::testfield().
| Player& AI::getPlayer | ( | int | player | ) | [inline] |
| void AI::showFieldInformation | ( | int | x, | |
| int | y | |||
| ) |
Definition at line 382 of file base.cpp.
References MapField::a, AIjobs, Vehicle::aiparam, AItasks, aiValueTypeNum, choehenstufen, GameMap::cleartemps(), AiParameter::dest, fieldvisiblenow(), MapCoordinate3D::getBitmappedHeight(), GameMap::getField(), AiParameter::getJob(), getMap(), getPlayerNum(), AiParameter::getTask(), AiValue::getValue(), ContainerBaseType::id, Vehicle::networkid, repaintMap, Section, strrr(), AiThreat::threat, Vehicle::typ, MapField::vehicle, MapCoordinate::x, and MapCoordinate::y.
Referenced by ASC_MainScreenWidget::eventKeyDown().
| VisibilityStates AI::getVision | ( | void | ) | [virtual] |
the AI uses a different vision than human player, to counter the fact that a human player can "know" a map and take a look before starting to play.
This function returns the minimum visibility state of a field.
Implements BaseAI.
| void AI::read | ( | tnstream & | stream | ) | [virtual] |
Implements BaseAI.
Definition at line 481 of file base.cpp.
References currentServiceOrderVersion, MapCoordinate::read(), tnstream::readFloat(), tnstream::readInt(), and ServiceOrder.
| void AI::write | ( | tnstream & | stream | ) | const [virtual] |
Implements BaseAI.
Definition at line 555 of file base.cpp.
References tnstream::writeFloat(), and tnstream::writeInt().
| Context AI::getContext | ( | ) |
Definition at line 601 of file base.cpp.
References Context::actingPlayer, Context::actionContainer, GameMap::actions, Context::display, Context::gamemap, getMap(), getPlayer(), GameMap::getPlayerView(), Context::parentAction, and Context::viewingPlayer.
friend class CalculateThreat_Vehicle [friend] |
friend class Section [friend] |
1.5.1