Class AIBrain.State

java.lang.Object
com.codename1.gaming.platformer.AIBrain.State
Enclosing class:
AIBrain

public static final class AIBrain.State extends Object
A named state: an action and its outgoing transitions.
  • Method Details

    • getName

      public String getName()

      The state's name.

      Returns

      the name

    • addTransition

      public AIBrain.State addTransition(AIBrain.Decision d, AIBrain.State target)

      Adds a transition, tried after earlier ones.

      Parameters
      • d: the condition
      • target: the state to switch to
      Returns

      this state, for chaining