formations_8h-source.html

来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 144 行 · 第 1/2 页

HTML
144
字号
00115   <font class="keywordtype">double</font>  <a class="code" href="classPlayerTypeInfo.html#a13">getMaxX</a>      (               ) <font class="keyword">const</font>;00116   <font class="keywordtype">bool</font>    <a class="code" href="classPlayerTypeInfo.html#a14">setBehindBall</a>( <font class="keywordtype">bool</font>    b     );00117   <font class="keywordtype">bool</font>    <a class="code" href="classPlayerTypeInfo.html#a15">getBehindBall</a>(               ) <font class="keyword">const</font>;00118 };00119 00120 00121 <font class="comment">/******************************************************************************/</font>00122 <font class="comment">/********************** CLASS FORMATIONTYPEINFO *******************************/</font>00123 <font class="comment">/******************************************************************************/</font>00124 <a name="l00130"></a><a class="code" href="classFormationTypeInfo.html">00130</a> <font class="keyword">class </font><a class="code" href="classFormationTypeInfo.html">FormationTypeInfo</a>00131 {<a name="l00132"></a><a class="code" href="classFormationTypeInfo.html#o0">00132</a>   <a class="code" href="SoccerTypes_8h.html#a249">FormationT</a>      <a class="code" href="classFormationTypeInfo.html#o0">formationType</a>;               <a name="l00133"></a><a class="code" href="classFormationTypeInfo.html#o1">00133</a>   <a class="code" href="classVecPosition.html">VecPosition</a>     <a class="code" href="classFormationTypeInfo.html#o1">posHome</a>[ <a class="code" href="SoccerTypes_8h.html#a0">MAX_TEAMMATES</a> ];    <a name="l00134"></a><a class="code" href="classFormationTypeInfo.html#o2">00134</a>   <a class="code" href="SoccerTypes_8h.html#a248">PlayerT</a>         <a class="code" href="classFormationTypeInfo.html#o2">playerType</a>[ <a class="code" href="SoccerTypes_8h.html#a0">MAX_TEAMMATES</a> ]; <a name="l00135"></a><a class="code" href="classFormationTypeInfo.html#o3">00135</a>   <a class="code" href="classPlayerTypeInfo.html">PlayerTypeInfo</a>  <a class="code" href="classFormationTypeInfo.html#o3">playerTypeInfo</a>[ <a class="code" href="SoccerTypes_8h.html#a2">MAX_PLAYER_TYPES</a> ]; 00137 <font class="keyword">public</font>:00138   <a class="code" href="classFormationTypeInfo.html#a0">FormationTypeInfo</a>(                    );00139   <font class="keywordtype">void</font> <a class="code" href="classFormationTypeInfo.html#a1">show</a>(         ostream &amp;os = cout );00140 00141   <font class="comment">// get and set methods to get information for a player in this formation</font>00142   <font class="keywordtype">bool</font>            <a class="code" href="classFormationTypeInfo.html#a2">setFormationType</a>         ( <a class="code" href="SoccerTypes_8h.html#a249">FormationT</a>  type                 );00143   <a class="code" href="SoccerTypes_8h.html#a249">FormationT</a>      <a class="code" href="classFormationTypeInfo.html#a3">getFormationType</a>         (                            ) <font class="keyword">const</font>;00144   <font class="keywordtype">bool</font>            <a class="code" href="classFormationTypeInfo.html#a4">setPosHome</a>               ( <a class="code" href="classVecPosition.html">VecPosition</a> pos,     <font class="keywordtype">int</font> atIndex );00145   <font class="keywordtype">bool</font>            <a class="code" href="classFormationTypeInfo.html#a5">setXPosHome</a>              ( <font class="keywordtype">double</font>      x,       <font class="keywordtype">int</font> atIndex );00146   <font class="keywordtype">bool</font>            <a class="code" href="classFormationTypeInfo.html#a6">setYPosHome</a>              ( <font class="keywordtype">double</font>      y,       <font class="keywordtype">int</font> atIndex );00147   <a class="code" href="classVecPosition.html">VecPosition</a>     <a class="code" href="classFormationTypeInfo.html#a7">getPosHome</a>               ( <font class="keywordtype">int</font>         atIndex        ) <font class="keyword">const</font>;00148   <font class="keywordtype">bool</font>            <a class="code" href="classFormationTypeInfo.html#a8">setPlayerType</a>            ( <a class="code" href="SoccerTypes_8h.html#a248">PlayerT</a>     type,    <font class="keywordtype">int</font> atIndex );00149   <a class="code" href="SoccerTypes_8h.html#a248">PlayerT</a>         <a class="code" href="classFormationTypeInfo.html#a9">getPlayerType</a>            ( <font class="keywordtype">int</font>         atIndex        ) <font class="keyword">const</font>;00150   <font class="keywordtype">bool</font>            <a class="code" href="classFormationTypeInfo.html#a10">setPlayerTypeInfo</a>        ( <a class="code" href="classPlayerTypeInfo.html">PlayerTypeInfo</a> info, <font class="keywordtype">int</font> atIndex );00151   <a class="code" href="classPlayerTypeInfo.html">PlayerTypeInfo</a>* <a class="code" href="classFormationTypeInfo.html#a11">getPlayerTypeInfo</a>        ( <font class="keywordtype">int</font>         atIndex              );00152   <a class="code" href="classPlayerTypeInfo.html">PlayerTypeInfo</a>* <a class="code" href="classFormationTypeInfo.html#a12">getPlayerTypeInfoOfPlayer</a>( <font class="keywordtype">int</font>         iPlayerInFormation   );00153 };00154 00155 <font class="comment">/******************************************************************************/</font>00156 <font class="comment">/********************** CLASS FORMATIONS **************************************/</font>00157 <font class="comment">/******************************************************************************/</font>00158 <a name="l00164"></a><a class="code" href="classFormations.html">00164</a> <font class="keyword">class </font><a class="code" href="classFormations.html">Formations</a>00165 {<a name="l00166"></a><a class="code" href="classFormations.html#o0">00166</a>   <a class="code" href="classFormationTypeInfo.html">FormationTypeInfo</a> <a class="code" href="classFormations.html#o0">formations</a>[ <a class="code" href="SoccerTypes_8h.html#a3">MAX_FORMATION_TYPES</a> ]; <a name="l00167"></a><a class="code" href="classFormations.html#o1">00167</a>   <a class="code" href="SoccerTypes_8h.html#a249">FormationT</a>        <a class="code" href="classFormations.html#o1">curFormation</a>;       <a name="l00168"></a><a class="code" href="classFormations.html#o2">00168</a>   <font class="keywordtype">int</font>               <a class="code" href="classFormations.html#o2">iPlayerInFormation</a>; 00169 <font class="keyword">public</font>:00170   <a class="code" href="classFormations.html#a0">Formations</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *strFile = NULL, <a class="code" href="SoccerTypes_8h.html#a249">FormationT</a> ft=<a class="code" href="SoccerTypes_8h.html#a249a200">FT_ILLEGAL</a>, <font class="keywordtype">int</font> iNr=1);00171   <font class="keywordtype">void</font> <a class="code" href="classFormations.html#a1">show</a> ( ostream &amp;os = cout );00172 00173   <font class="comment">// method to get the strategic position depending on different factors</font>00174   <a class="code" href="classVecPosition.html">VecPosition</a> <a class="code" href="classFormations.html#a2">getStrategicPosition</a>( <font class="keywordtype">int</font>         iPlayer,00175                                     <a class="code" href="classVecPosition.html">VecPosition</a> posBall,00176                                     <font class="keywordtype">double</font>      dMaxXInPlayMode );00177 00178   <font class="comment">// method to read the formations from a formation configuration file.</font>00179   <font class="keywordtype">bool</font>        <a class="code" href="classFormations.html#a3">readFormations</a>      ( <font class="keyword">const</font> <font class="keywordtype">char</font> *strFile         );00180 00181   <font class="comment">// standard get and set methods for the different member variables</font>00182   <font class="keywordtype">bool</font>        <a class="code" href="classFormations.html#a4">setFormation</a>        ( <a class="code" href="SoccerTypes_8h.html#a249">FormationT</a> formation        );00183   <a class="code" href="SoccerTypes_8h.html#a249">FormationT</a>  <a class="code" href="classFormations.html#a5">getFormation</a>        (                             ) <font class="keyword">const</font>;00184   <font class="keywordtype">bool</font>        <a class="code" href="classFormations.html#a6">setPlayerInFormation</a>( <font class="keywordtype">int</font> number                  );00185   <font class="keywordtype">int</font>         <a class="code" href="classFormations.html#a7">getPlayerInFormation</a>(                             ) <font class="keyword">const</font>;00186   <a class="code" href="SoccerTypes_8h.html#a248">PlayerT</a>     <a class="code" href="classFormations.html#a8">getPlayerType</a>       (                             ) <font class="keyword">const</font>;00187 };00188 00189 <font class="preprocessor">#endif</font></font></pre></div><hr><address><small>Generated on Thu Mar 7 00:37:42 2002 for UvA Trilearn 2001 by<a href="http://www.doxygen.org/index.html"><img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.12 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, &copy;&nbsp;1997-2001</small></address></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?