Hey Nicklas,
Thanks for sharing your opinion about if-else statements. I'm also a big fan of state machines.
I was confused as to what language this code was written in, so I checked the comments. Someone said it's C#. All those "internal override void" statements make me cringe, but I guess that's how you write C#.
Do you think there's a place for writing
if(yes) {}
if(!yes) {}
as a clearer alternatives to if-else?
I also think a lot of programmers are a fans of "guard clauses," which I understand to be early return statements:
if(yes) {return 1}
if(simonSays) {return 2}
return 3
Do I understand that correctly? Is that a pattern you like to use inside your state machines?
Cheers!