Basically a finite state machine.
A bunch of conditions like this:
+ GameState == "StartStep PlayerA"
do stuff required for this step
if done then GameState = PlayStep PlayerA
+ GameState == "PlayStep PlayerA"
do stuff required for this step
if done then GameState = AttackStep PlayerA
and so on. Basically you have a global variable that holds the current state and a bunch of conditions for each of states. While a state is true, that stage is executed, until it is done, at which point the state is changed to the next stage.
At the last stage, you point back to the first stage.