changed game loop to use room class