refactor loading of snake game.