A really simple state machine in c#