BWAPI
BasicAIModule/source/Agents/UnitAgents/MedicAgent.cpp
Go to the documentation of this file.
00001 /*
00002  * MedicAgent.cpp
00003  */
00004 #include "MedicAgent.h"
00005 #include "GroundAgent.h"
00006 
00007 #include <BWAPI.h>
00008 
00009 using BWAPI::Unit;
00010 
00011 
00012 MedicAgent::MedicAgent(Unit& u)
00013         : GroundAgent(u)
00014 {
00015 //    state = DefendState;
00016 }
00017 
00018 void MedicAgent::update()
00019 {
00020     switch(state)
00021     {
00022     case IdleState: break;
00023     case AttackState: unit.attack(positionTarget); break;
00024     case DefendState: unit.attack(positionTarget); break;
00025     }
00026     GroundAgent::update();
00027 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines