Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public static final class AIBrain.State

  1. Object
  2. AIBrain.State
A named state: an action and its outgoing transitions.

Methods

public String getName()The state’s name.
public AIBrain.State addTransition(AIBrain.Decision d, AIBrain.State target)Adds a transition, tried after earlier ones.

Inherited methods

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 AIBrain.Decision
the condition
target AIBrain.State
the state to switch to

Returns

this state, for chaining