BWAPI
trunk/bwapi/TestAIModule/Source/TransportTest.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "TestCase.h"
00003 #include <BWAPI.h>
00004 #include <vector>
00005 
00006 class TransportTest : public TestCase
00007 {
00008   public:
00009     TransportTest(BWAPI::UnitType unitType);
00010     virtual void start();
00011     virtual void update();
00012     virtual void stop();
00013   private:
00014     bool verifyLoadedUnits();
00015     int startFrame;
00016     int nextFrame;
00017     BWAPI::UnitType transportType;
00018     BWAPI::Unit* transport;
00019     BWAPI::Unit* currentUnit;
00020     std::set<BWAPI::Unit*> unloadedUnits;
00021     std::set<BWAPI::Unit*> loadedUnits;
00022     int waitFrameStart;
00023     enum LoadState
00024     {
00025       Start,
00026       WaitForFirstUnit,
00027       WaitForSecondUnit,
00028       WaitForThirdUnit,
00029       WaitForFourthUnit,
00030       WaitDelay1,
00031       WaitUnloadUnit,
00032       WaitReloadUnit,
00033       WaitUnloadAll,
00034       WaitReloadAll,
00035       WaitUnloadAllPosition,
00036       End
00037     } state;
00038 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines