I'm having difficulty understanding what a state should or should not do and how to architect a simple FSM properly.
I'm trying to make a simple turn based, board game system where Turn Start -> NPC Decides -> Player Decides -> Player Effect Resolution -> NPC Effect Resolution -> End of Turn (return to Turn Start)
I've looked at coroutines to decouple from the Update constantly polling, then to understanding async (which I believe I want to use Awaitable and understand that concept). I just don't know what the "right" way of implementing this system is.
Like having an enum in a game manager of all these states is supposedly bad, and a state class is NOT supposed to interact with another state so I don't know how to transition enter/exit or interact with other states without falling back onto an enum in a manager class (which seems redundant). I don't get how a state machine should work independent from what a manger class would do either. If states aren't supposed to interact with each other, how do I specify enter/exit conditions without the enum/manager?
To sum it up - I want to implement the above loop in a clean way but utilize proper architecture that can account for variable things happening within the state (like Player Effect -> a player can attack which ends the effect or they can move on a game board and the land on a space in the game board where something happens, either set of effects resolving leads to the next state -> NPC Effect).