main loop to game class