Difference between revisions of "Category talk:Robocode Theory"
(Answer) |
|||
Line 6: | Line 6: | ||
Hi. Bots that extend Robot don't get damage when they hit a wall. [http://robowiki.net/cgi-bin/robowiki?Robot More information here] and also in the [[Robocode/FAQ]] at the question ''How much damage does a bullet do? How do I gain or lose energy?'' On the other hand, take a closer look at the code of sample.Walls, it always hits the walls because the moveAmount is <code> Math.max(getBattleFieldWidth(), getBattleFieldHeight()); </code> | Hi. Bots that extend Robot don't get damage when they hit a wall. [http://robowiki.net/cgi-bin/robowiki?Robot More information here] and also in the [[Robocode/FAQ]] at the question ''How much damage does a bullet do? How do I gain or lose energy?'' On the other hand, take a closer look at the code of sample.Walls, it always hits the walls because the moveAmount is <code> Math.max(getBattleFieldWidth(), getBattleFieldHeight()); </code> | ||
I hope I had helped you. --Jab | I hope I had helped you. --Jab | ||
+ | |||
+ | Okay, thanks for your quick answer. --Sulibilune |
Latest revision as of 19:05, 25 March 2008
I post here because I don't know where I should do it. I have a problem : I was trying to make a new bot with sample.walls ad found this : if I change the extension Robot in AdvancedRobot the sample.walls takes damages when he hit a wall (but in his code he should'nt hit walls)... Can someone explain me why ? (sorry for my english -I'm french- ) --Sulibilune
Hi. Bots that extend Robot don't get damage when they hit a wall. More information here and also in the Robocode/FAQ at the question How much damage does a bullet do? How do I gain or lose energy? On the other hand, take a closer look at the code of sample.Walls, it always hits the walls because the moveAmount is Math.max(getBattleFieldWidth(), getBattleFieldHeight());
I hope I had helped you. --Jab
Okay, thanks for your quick answer. --Sulibilune