move game logic to gameengine