serversettings_8c-source.html

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

HTML
504
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>ServerSettings.C Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.12 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>ServerSettings.C</h1><a href="ServerSettings_8C.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>00002 <font class="comment">Copyright (c) 2000,2001, Jelle Kok, University of Amsterdam</font>00003 <font class="comment">All rights reserved.</font>00004 <font class="comment"></font>00005 <font class="comment">Redistribution and use in source and binary forms, with or without </font>00006 <font class="comment">modification, are permitted provided that the following conditions are met:</font>00007 <font class="comment"></font>00008 <font class="comment">1. Redistributions of source code must retain the above copyright notice, this </font>00009 <font class="comment">list of conditions and the following disclaimer. </font>00010 <font class="comment"></font>00011 <font class="comment">2. Redistributions in binary form must reproduce the above copyright notice, </font>00012 <font class="comment">this list of conditions and the following disclaimer in the documentation </font>00013 <font class="comment">and/or other materials provided with the distribution. </font>00014 <font class="comment"></font>00015 <font class="comment">3. Neither the name of the University of Amsterdam nor the names of its </font>00016 <font class="comment">contributors may be used to endorse or promote products derived from this </font>00017 <font class="comment">software without specific prior written permission. </font>00018 <font class="comment"></font>00019 <font class="comment">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" </font>00020 <font class="comment">AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE </font>00021 <font class="comment">IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE </font>00022 <font class="comment">DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE </font>00023 <font class="comment">FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL </font>00024 <font class="comment">DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR </font>00025 <font class="comment">SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER </font>00026 <font class="comment">CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, </font>00027 <font class="comment">OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE </font>00028 <font class="comment">OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</font>00029 <font class="comment">*/</font>00046 <font class="preprocessor">#include "<a class="code" href="ServerSettings_8h.html">ServerSettings.h</a>"</font>00047 <font class="preprocessor">#include &lt;stdio.h&gt;</font>00048 <font class="preprocessor">#include &lt;string.h&gt;</font>           <font class="comment">// needed for 'strcpy'</font>00049 00050 <font class="comment">/******************************************************************************/</font>00051 <font class="comment">/********************   CLASS SERVERSETTINGS   ********************************/</font>00052 <font class="comment">/******************************************************************************/</font>00053 <a name="l00059"></a><a class="code" href="classServerSettings.html#a0">00059</a> <a class="code" href="classServerSettings.html#a0">ServerSettings::ServerSettings</a>( ):<a class="code" href="classGenericValues.html">GenericValues</a>( "<a class="code" href="classServerSettings.html">ServerSettings</a>", 104 )00060 {00061   <font class="comment">// goal-related parameters</font>00062   <a class="code" href="classServerSettings.html#o0">dGoalWidth</a>         = 14.02; <font class="comment">// goal_width: the width of the goal</font>00063 00064   <font class="comment">// player-related parameters</font>00065   <a class="code" href="classServerSettings.html#o1">dPlayerSize</a>        = 0.3;   <font class="comment">// player_size: the size (=radius) of a player</font>00066   <a class="code" href="classServerSettings.html#o2">dPlayerDecay</a>       = 0.4;   <font class="comment">// player_decay: player speed decay per cycle</font>00067   <a class="code" href="classServerSettings.html#o3">dPlayerRand</a>        = 0.1;   <font class="comment">// player_rand: random error in player movement</font>00068   <a class="code" href="classServerSettings.html#o4">dPlayerWeight</a>      = 60.0;  <font class="comment">// player_weight: weight of a player (for wind)</font>00069   <a class="code" href="classServerSettings.html#o5">dPlayerSpeedMax</a>    = 1.0;   <font class="comment">// player_speed_max: maximum speed of a player</font>00070   <a class="code" href="classServerSettings.html#o6">dPlayerAccelMax</a>    = 1.0;   <font class="comment">// player_accel_max: maximum acceleration of a</font>00071                               <font class="comment">// player per cycle</font>00072 00073   <font class="comment">// stamina-related parameters</font>00074   <a class="code" href="classServerSettings.html#o7">dStaminaMax</a>        = 4000.0;<font class="comment">// stamina_max: maximum stamina of a player</font>00075   <a class="code" href="classServerSettings.html#o8">dStaminaIncMax</a>     = 45.0;  <font class="comment">// stamina_inc_max: maximum stamina increase of a</font>00076                               <font class="comment">// player per cycle</font>00077   <a class="code" href="classServerSettings.html#o9">dRecoverDecThr</a>     = 0.3;   <font class="comment">// recover_dec_thr: percentage of stamina_max</font>00078                               <font class="comment">// below which player recovery decreases</font>00079   <a class="code" href="classServerSettings.html#o10">dRecoverDec</a>        = 0.002; <font class="comment">// recover_dec: decrement step per cycle for</font>00080                               <font class="comment">// player recovery</font>00081   <a class="code" href="classServerSettings.html#o11">dRecoverMin</a>        = 0.5;   <font class="comment">// recover_min: minimum player recovery</font>00082   <a class="code" href="classServerSettings.html#o12">dEffortDecThr</a>      = 0.3;   <font class="comment">// effort_dec_thr: percentage of stamina_max below</font>00083                               <font class="comment">// which player effort capacity decreases</font>00084   <a class="code" href="classServerSettings.html#o13">dEffortDec</a>         = 0.005; <font class="comment">// effort_dec: decrement step per cycle for</font>00085                               <font class="comment">// player effort capacity</font>00086   <a class="code" href="classServerSettings.html#o14">dEffortIncThr</a>      = 0.6;   <font class="comment">// effort_incr_thr: percentage of stamina_max</font>00087                               <font class="comment">// above which player effort capacity increases</font>00088   <a class="code" href="classServerSettings.html#o15">dEffortInc</a>         = 0.01;  <font class="comment">// effort_inc: increment step per cycle for</font>00089                               <font class="comment">// player effort capacity</font>00090   <a class="code" href="classServerSettings.html#o16">dEffortMin</a>         = 0.6;   <font class="comment">// effort_min: minimum value for player effort</font>00091 00092   <font class="comment">// parameters related to auditory perception</font>00093   <a class="code" href="classServerSettings.html#o17">iHearMax</a>           = 2;     <font class="comment">// hear_max: maximum hearing capacity of a player;</font>00094                               <font class="comment">// a player can hear hear_inc messages in</font>00095                               <font class="comment">// hear_decay simulation cycles</font>00096   <a class="code" href="classServerSettings.html#o18">iHearInc</a>           = 1;     <font class="comment">// hear_inc: minimum hearing capacity of a player,</font>00097                               <font class="comment">// i.e. the number of messages a player can hear</font>00098                               <font class="comment">// in hear_decay simulation cycles</font>00099   <a class="code" href="classServerSettings.html#o19">iHearDecay</a>         = 2;     <font class="comment">// hear_decay: decay rate of player hearing</font>00100                               <font class="comment">// capacity, i.e. minimum number of cycles for</font>00101                               <font class="comment">// hear_inc messages</font>00102 00103   <font class="comment">// parameters related to player turn actions</font>00104   <a class="code" href="classServerSettings.html#o20">dInertiaMoment</a>     = 5.0;   <font class="comment">// inertia_moment: inertia moment of a player;</font>00105                               <font class="comment">// affects actual turn angle depending on speed</font>00106 00107   <font class="comment">// parameters related to sense_body information</font>00108   <a class="code" href="classServerSettings.html#o21">iSenseBodyStep</a>     = 100;   <font class="comment">// sense_body_step: length of the interval (in ms)</font>00109                               <font class="comment">// between sense_body information messages</font>00110 00111   <font class="comment">// goalkeeper-related parameters</font>00112   <a class="code" href="classServerSettings.html#o22">dCatchableAreaL</a>    = 2.0;   <font class="comment">// catchable_area_l: length of area around</font>00113                               <font class="comment">// goalkeeper in which he can catch the ball</font>00114   <a class="code" href="classServerSettings.html#o23">dCatchableAreaW</a>    = 1.0;   <font class="comment">// catchable_area_w: width of area around</font>

⌨️ 快捷键说明

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