split game logic and app