Added a game loop for the sample