a game with oop and fsm