Bots using functions like forward() are getting stuck. #87
-
Hello. I've just started and I'm noticing that the bot I programmed via the MyFirstBot tutorial is frequently getting stuck for no apparent reason. While using the forward() or back() functions it begins sort of vibrating and is stuck like that until another tank rams it. I've also noticed this issue in some of the other sample bots. Any help is appreciated. import dev.robocode.tankroyale.botapi.*;
public class MyFirstBot extends Bot {
// The main method starts our bot
public static void main(String[] args) {
new MyFirstBot().start();
}
// Constructor, which loads the bot config file
MyFirstBot() {
super(BotInfo.fromFile("MyFirstBot.json"));
}
// Called when a new round is started -> initialize and do some movement
@Override
public void run() {
// Repeat while the bot is running
while (isRunning()) {
forward(100);
turnGunRight(360);
back(100);
turnGunRight(360);
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@TheFlameFish: A temporary work-around would be to stick to use version 0.22.2 until the next version is out, which does not have this bug. |
Beta Was this translation helpful? Give feedback.
@TheFlameFish:
Thank you for reporting this. 😊👌
I believe this bug was introduced with version 0.23.0, and I made a fix for it with the next version 0.23.1.
A temporary work-around would be to stick to use version 0.22.2 until the next version is out, which does not have this bug.