BWAPI
quorum/ExampleAIModule/CrawlingBallAttack.h
Go to the documentation of this file.
00001 #ifndef CHOKEPOINTCRAWL_H
00002 #define CHOKEPOINTCRAWL_H
00003 #include "TacticsImplementations.h"
00004 #include "ThreatAwarePathfinder.h"
00005 #include "BWTA.h"
00006 #include "SquadTacticsModel.h"
00007 #include "UnitModel.h"
00008 
00009 using namespace BWTA;
00010 
00011 class CrawlingBallAttack : public TacticsImplementation {
00012 public:
00013         CrawlingBallAttack(Squad* m, AgentPool* p, SquadTacticsModel* sm);
00014         virtual bool execute();
00015                 virtual std::vector<MicroTacticsModel*> getSubTeam(UnitType t);
00016                 virtual void receiveAlert(Unit* t);
00017                 virtual void assignUnit(Unit* u);
00018                 virtual void removeUnit(Unit* u);
00019                 Squad* getSquad();
00020                 void eraseDead();
00021                 bool isAlive();
00022                 void calculateNextTarget();
00023                 std::vector<TilePosition> bubble_sort(std::vector<TilePosition> input);
00024                 std::vector<MicroTacticsModel*> getDeadUnits(UnitType t);std::string test;
00025                 void calcPoint(TilePosition t);
00026                 TilePosition evalPoints(std::vector<TilePosition> f);
00027                         
00028 private:
00029         std::vector<MicroTacticsModel*> unitTactics;
00030         std::vector<TilePosition> path;
00031         AgentPool* agentPool;
00032         Squad* element;
00033         Position goal;
00034         TilePosition subgoal;
00035         BWTA::Region* targetRegion;
00036         UnitModel* targetUnit;
00037         bool atChokePoint;
00038         bool dead;
00039         MicroTacticsModel* pointMarine;
00040         int wait;
00041         int stepSize;
00042         ThreatAwarePathFinder* pf;
00043         SquadTacticsModel* tacticsModel;
00044         std::map<Unit*,Position> assignments;
00045         std::map<Unit*,int> teleporterClicks;
00046         std::map<Unit*,Unit*> teleporterAssignments;
00047         std::vector<UnitModel*> attackList;
00048         std::vector<TilePosition> v;
00049         unsigned int cur;
00050         bool atGoal;
00051         int initialsize;
00052         int movementTimer;
00053         bool teleportersOnMap;
00054         bool finished;
00055 };
00056 
00057 #endif
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines