simulink&

stateflow

SIMULINK

Stateflow for the horde

On the top is when you didn't do the motion and the enemy is the horde, the output is 0.

The second line is when you didn't do the motion and the enemy is the alliance, the output is 1.

The third line is when you do the motion and the enemy is the horde, the output is 2.

The last line is when you do the motion and the enemy is the alliance, the output is 3.

Stateflow for the horde

The same as the stateflow for horde.