template for game logic functions