Imagine we are working on a game in which the player controls a spaceship. Our lead designer is still brainstorming ideas on what exactly the spaceship will be able to do in our game. But they ask us to implement at least three core states that our spaceship could be in depending on the result of a space battle against an enemy ship:
- Normal: The player's spaceship is running as normal
- Alert: An enemy spaceship is approaching and is ready to attack
- Disabled: The player's spaceship has been defeated in battle and currently cannot move or fight back
In each state, there's a specific set of behaviors and actions for the crew members to perform:
- Normal: The crew members go into their default positions and perform their assigned ...