robocode-dev / tank-royale

Git repository for Robocode Tank Royale
Apache License 2.0
144 stars 29 forks source link

Blocking functions `forward` and `back` do not execute on first run #22

Closed beamer159 closed 2 years ago

beamer159 commented 2 years ago

My run function looks like this:

@Override
public void run() {
    forward(500);
}

When I create a battle and boot my robot, in the first battle, the robot does not move forward. Restarting the battle does not replicate the error. Stopping the battle and starting a new battle without unbooting and rebooting the robot does not replicate the error. However, stopping the battle, starting a new battle, unbooting the robot, and booting it again does replicate the error.

This behavior does not occur for blocking functions turnRight and turnLeft

Video demonstrating the issue:

Animation

flemming-n-larsen commented 2 years ago

@beamer159: Nice finding. :+1:

I have a LameBot doing the same, but with some additional System.out.println().

I can reproduce this strange issue and confirm this bug for the JVM version of the Bot API. It does not seem to occur for the .Net version.

flemming-n-larsen commented 2 years ago

@beamer159

This issue should be fixed with current Release 0.13.2. 🙂