wrap game logic in function