|
BWAPI
|
00001 #pragma once 00002 00003 #include "Common.h" 00004 00005 class SquadOrder 00006 { 00007 public: 00008 00009 enum Type { None, Attack, Defend, SquadOrderTypes }; 00010 00011 Type type; 00012 BWAPI::Position position; 00013 int radius; 00014 00015 SquadOrder() : type(None) {} 00016 SquadOrder(Type type, BWAPI::Position position, int radius) : 00017 type(type), position(position), radius(radius) {} 00018 00019 std::string getOrderString() { 00020 00021 if (type == SquadOrder::Attack) { return "Attack"; } 00022 else if (type == SquadOrder::Defend) { return "Defend"; } 00023 00024 return "Not Formed"; 00025 } 00026 };
1.7.6.1