Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/DynamicTeamTactic/TacticEntry.h

Go to the documentation of this file.
00001 /**
00002  * @file TacticEntry.h
00003  * 
00004  * Declaration of class TacticEntry
00005  * @author <A href=mailto:b@tchman.de>Mathias Hülsbusch</A>
00006  * @author <A href=mailto:frank.rossdeutscher@uni-dortmund.de>Frank Rossdeutscher</A>
00007  */ 
00008 
00009 #ifndef __TacticEntry_h_
00010 #define __TacticEntry_h_
00011 
00012 #include "Tools/Player.h"
00013 #include "RateableOptions.h"
00014 
00015 
00016 /**
00017  *  The class contains the information needed for one TacticEntry
00018  */
00019 class TacticEntry
00020 {
00021 public:
00022 
00023   /** Constructor */
00024   TacticEntry();
00025 
00026   /** Constructor */
00027   TacticEntry(int folEntCount);
00028 
00029   /** Destructor */
00030   ~TacticEntry();
00031 
00032  /**
00033   * .An Array with up to 4 options that are needed for one entry
00034   */
00035   int neededOptions[Player::numOfPlayerNumbers];
00036 
00037  /**
00038   * .Which dogs are allowed to do this option ?
00039   *  This is basically a flag array.
00040   *  eg:
00041   *  01111 means that all dogs are allowed
00042   *  01110 means that dog #1 is not allowed for this option.
00043   *  So ( (allowedDogs[dognum] & (1 << dognum)) > 0 ) should be TRUE 
00044   *  if Dog #dognum is allowed for option #neededOptions[dognum]. But have a look in
00045   *  Player.h. If the playerNumber-enum changes, this test may cause trouble. 
00046   *  
00047   *  forget about this shifting-stuff .. an array of bool does the same, 
00048   *  but without all this enum-trusting ;)
00049   *  use: allowedDogs[#dog][#option]
00050   */
00051   bool allowedDogs[Player::numOfPlayerNumbers][Player::numOfPlayerNumbers];
00052 
00053  /**
00054   * .is one Option a option-class ?? .. 
00055   *  we dont need this yet, but we will be happy to have this *g*
00056   */
00057   
00058   bool isOptionClass[Player::numOfPlayerNumbers];
00059 
00060  /**
00061   * .The TacticEntry itself needs a weight
00062   */
00063   double weight;
00064 
00065 
00066  /**
00067   * .Each option needs one weight. So here they are
00068   */
00069   double optionWeights[Player::numOfPlayerNumbers];
00070 
00071 
00072  /**
00073   * .What ist the maximum value this TacticEntry can reach
00074   *  This data can be uses to skip TacticEntrys while searching
00075   *  the best matching TacticEntry.
00076   */
00077   double maxVal;
00078 
00079  /**
00080   *  How many followingEntrys are there ?
00081   */
00082   int followingEntryCount;
00083 
00084  /**
00085   *  Which TacticEntrys should be preferred after choosing this TacticEntry ?
00086   */
00087   int* followingEntrys;
00088 
00089  /**
00090   *  How would you like to weight your preferred followingEntrys ? .
00091   */
00092   double* followingEntryWeights;
00093 
00094  /**
00095   * Information for GlobalAnalysers. Each Analyser can store an integer here
00096   * to identify the Class of TacticEntry, e.g. is an offensive TacticEntry..
00097   */
00098   RateableOptions::TacticEntryTypeID globalAnalysersInfo[RateableOptions::numOfGlobalAnalysers];
00099 
00100 
00101   void setFollowingEntryCount(int count);
00102 
00103  /**
00104   *  name of the TacticEntry
00105   */
00106   char name[50];
00107 };
00108 
00109 
00110 
00111 
00112 /**
00113  *  The class contains an array of TacticEntrys
00114  */
00115 class TacticEntryArray
00116 {
00117 public:
00118   /** Constructor */
00119   TacticEntryArray();
00120 
00121   /** Constructor with count*/
00122   TacticEntryArray(int count);
00123 
00124   /** Destructor */
00125   ~TacticEntryArray();
00126 
00127   int entryCount;
00128 
00129   TacticEntry* entrys;
00130 
00131   // TacticEntry lastChoice; ???
00132 
00133   void setEntryCount(int count);
00134 
00135 
00136 };
00137 
00138 
00139 /**
00140  * Streaming operator that reads a TacticEntryArray from a stream.
00141  * @param stream The stream from which is read.
00142  * @param tacticEntryArray the TacticEntryArray object.
00143  * @return The stream.
00144  */ 
00145 In& operator>>(In& stream,TacticEntryArray& tacticEntryArray);
00146  
00147 /**
00148  * Streaming operator that writes a TacticEntryArray to a stream.
00149  * @param stream The stream to write on.
00150  * @param tacticEntryArray The TacticEntryArray object.
00151  * @return The stream.
00152  */ 
00153 Out& operator<<(Out& stream, const TacticEntryArray& tacticEntryArray);
00154 
00155 
00156 
00157 #endif //__TacticEntry_h_
00158 
00159 /*
00160  * Change log :
00161  * $Log: TacticEntry.h,v $
00162  * Revision 1.3  2004/07/22 22:38:35  kerdels
00163  * added DTT used by Open Challenge, RIP and Xabsl-Options will follow
00164  *
00165  *
00166  *
00167  */
00168 

Generated on Thu Sep 23 19:57:37 2004 for GT2004 by doxygen 1.3.6