Moved game loop inside game class