Class AIBrain.Chance
java.lang.Object
com.codename1.gaming.platformer.AIBrain.Chance
- All Implemented Interfaces:
AIBrain.Decision
- Enclosing class:
AIBrain
Holds with a chance per tick, drawn from the world's deterministic
Rng.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandecide(AIBrain brain, Actor self, PlatformWorld world) Whether the transition should fire.
-
Constructor Details
-
Chance
public Chance(int perThousand) A random check.
Parameters
perThousand: the chance per tick, out of 1000
-
-
Method Details
-
decide
Description copied from interface:AIBrain.DecisionWhether the transition should fire.
Parameters
brain: the brainself: the actorworld: the world
Returns
true to switch
- Specified by:
decidein interfaceAIBrain.Decision
-