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. SeeCondition
andIBot.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 } } }
-
-
Constructor Summary
Constructors Constructor Description NextTurnCondition(IBaseBot baseBot)
Constructor for initializing a new instance of the NextTurnCondition class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
test()
This method tests if the turn number has changed since we created this condition.
-