Class NextTurnCondition

java.lang.Object
dev.robocode.tankroyale.botapi.events.Condition
dev.robocode.tankroyale.botapi.events.NextTurnCondition

public final class NextTurnCondition extends Condition
Prebuilt condition that can be used for waiting for the next turn. See Condition and IBot.waitFor(dev.robocode.tankroyale.botapi.events.Condition) for more information.

Here is an example of how to use this condition:


  public class MyBot extends Bot {
    public void run() {
      while (isRunning()) {
        ...
        setFire(1.0);
        ...
        waitFor(new NextTurnCondition(this)); // wait for the next turn before continuing
      }
    }
 }