Difference between revisions of "Category talk:Robocode Theory"
(New page: 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 ...) |
(Answer) |
||
Line 3: | Line 3: | ||
Can someone explain me why ? | Can someone explain me why ? | ||
(sorry for my english -I'm french- ) --Sulibilune | (sorry for my english -I'm french- ) --Sulibilune | ||
+ | |||
+ | 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 |
Revision as of 23:31, 24 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