A Cascaded SAM Implementation by Steve Pritchard

The SAM (State-Action-Model) pattern proposed by Jean-Jacques Dubray is explained at sam.js.org

The advance to Jean-Jacques Dubray's SAM pattern presented here is the added notion of cascading the SAM complexes such that they can have a parent/child relationship.

A working Rocket example using this implemenation can be seen at Rocket Example. The Pause option was added because it added more complexity and permutations to the state machine.

A working cascaded example using the Rocket model as a component can be seen at Missiles Example.

The zipped source code is at download

The github source samcas src

This implementation has the following characteristics: