00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __RateableOptions_h_
00009 #define __RateableOptions_h_
00010
00011 #include <string.h>
00012
00013
00014
00015
00016 class RateableOptions
00017 {
00018 public:
00019
00020
00021
00022
00023
00024 enum OptionID
00025 {
00026 noOption = 0,
00027 doNothing,
00028 stand,
00029 keepOption,
00030 intro,
00031 extro,
00032 finished,
00033 gotoBitePos1,
00034 gotoBitePos2,
00035 gotoBitePos3,
00036 gotoBitePos4,
00037 bitePos1,
00038 bitePos2,
00039 bitePos3,
00040 bitePos4,
00041 movePos1,
00042 movePos2,
00043 movePos3,
00044 movePos4,
00045 gotoBridge,
00046 climbBridge,
00047 waitForBiteDogs,
00048 moveBridge,
00049 numOfOptions
00050 };
00051
00052
00053
00054
00055
00056 enum OptionType {
00057 special,
00058 gotoPos,
00059 gotoBallPos,
00060 kickAction,
00061 goalieAction,
00062 notype
00063 };
00064
00065
00066 enum OptionClassID
00067 {
00068 doSomething = numOfOptions,
00069 maxOptionClassID,
00070 numOfOptionClasses = maxOptionClassID - numOfOptions
00071 };
00072
00073 typedef struct {
00074 int id;
00075 char *name;
00076 int numOfSubOptions;
00077 int changeThreshold;
00078 OptionType optionType;
00079 int slidingAverageRange;
00080 int ratingBoost;
00081 } OptionInfo;
00082
00083 static OptionInfo optionInfos[];
00084
00085
00086
00087
00088
00089 enum TacticEntryTypeID {
00090
00091 FirstTETID = 0,
00092
00093
00094 defGA_Neutral,
00095 defGA_Max,
00096
00097 numOfTETIDs
00098 };
00099
00100
00101
00102
00103
00104 static const char* getOptionName(int id);
00105 static int getOptionID(const char* name);
00106 static OptionType getOptionType(int id);
00107 static int getSlidingAverageRange(int id);
00108 static int getRatingBoost(int id);
00109
00110
00111
00112
00113
00114 static int getNumberOfClassMembers(OptionClassID id);
00115 static int getOptionClassChangeThreshold(OptionClassID id);
00116 static OptionID getClassMember(OptionClassID id, int idx);
00117
00118 static bool isOptionClass(int id);
00119 static bool isClassMember(OptionClassID OCid, OptionID Oid);
00120
00121
00122
00123
00124
00125 enum OptionRatingID
00126 {
00127 defaultOptionRating = 0,
00128 numOfOptionRatings
00129 };
00130
00131
00132
00133
00134
00135 enum TacticChooserID
00136 {
00137 defaultTacticChooser = 0,
00138 numOfTacticChoosers
00139 };
00140
00141
00142
00143
00144
00145
00146
00147 enum GlobalAnalyserID
00148 {
00149 defaultGlobalAnalyser = 0,
00150 numOfGlobalAnalysers
00151 };
00152
00153
00154
00155
00156
00157 static const char* getTETIDName(TacticEntryTypeID id)
00158 {
00159 switch (id) {
00160 case defGA_Neutral : return "Neutral";
00161 default: return "please edit RateableOptions::getTETIDName";
00162 }
00163 }
00164
00165
00166
00167
00168
00169 static const char* getGlobalAnalyserName(GlobalAnalyserID id)
00170 {
00171 switch (id)
00172 {
00173 case defaultGlobalAnalyser : return "DefGlobalAnalyser";
00174 default: return "please edit RateableOptions::getGlobalAnalyserName";
00175 }
00176 }
00177
00178
00179
00180
00181 static int getGlobalAnalyserTETBase(GlobalAnalyserID id)
00182 {
00183 switch (id) {
00184 case defaultGlobalAnalyser : return (int)defGA_Neutral;
00185 default: return -1;
00186 }
00187 }
00188
00189
00190
00191
00192 static int getGlobalAnalyserTETCount(GlobalAnalyserID id)
00193 {
00194 switch (id) {
00195 case defaultGlobalAnalyser : return ((int)defGA_Max - (int)defGA_Neutral);
00196 default: return -1;
00197 }
00198 }
00199
00200
00201
00202
00203 static TacticEntryTypeID getGlobalAnalyserNeutralTETID(GlobalAnalyserID id)
00204 {
00205 switch (id) {
00206 case defaultGlobalAnalyser : return defGA_Neutral;
00207 default: return FirstTETID;
00208 }
00209 }
00210
00211
00212
00213
00214
00215 static TacticEntryTypeID getTETID(GlobalAnalyserID id, const char* name)
00216 {
00217 switch (id) {
00218 case defaultGlobalAnalyser: {
00219 if (strcmp(name, "Neutral") == 0)
00220 return defGA_Neutral;
00221 else
00222 return FirstTETID;
00223 } break;
00224
00225 default: return FirstTETID;
00226 }
00227 }
00228
00229 };
00230
00231 #endif //__RateableOptions_h_
00232
00233
00234
00235
00236
00237
00238
00239
00240