Category talk:Robocode Theory

From Robowiki
Jump to navigation Jump to search

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

There are no threads on this page yet.