Practice free →
Home › Per Nystrom (State pattern), modelling a charact…

Per Nystrom (State pattern), modelling a character with 'standing', 'jumping', 'ducking' behaviour uses which pattern?

AVisitor pattern over a node tree
BAdapter pattern for legacy APIs
CStrategy pattern for algorithms
DFinite State Machine (FSM) of behaviour
Answer & Solution
Correct answer: D. Finite State Machine (FSM) of behaviour
Nystrom Ch. State: each state is a class; transitions are explicit edges. Implements an FSM with one state object per state.
Solve this in the app — Practice practice & 24k+ MCQs →
Related questions