Class NextTurnCondition
java.lang.Object
dev.robocode.tankroyale.botapi.events.Condition
dev.robocode.tankroyale.botapi.events.NextTurnCondition
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
}
}
}
-
Constructor Summary
ConstructorDescriptionNextTurnCondition
(IBaseBot baseBot) Constructor for initializing a new instance of the NextTurnCondition class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
test()
This method tests if the turn number has changed since we created this condition.
-
Constructor Details
-
NextTurnCondition
-
-
Method Details
-
test
-