public @Bean StateManager stateManager() {
Bus bus = bus();
Collection<State> states = new LinkedList<State>();
states.add(gameState());
states.add(menuState());
StateManager stateManager = new StateManager(states);
bus.register(stateManager, null);
bus.broadcast(new StateChange(MenuState.class));
return stateManager;
}