游戏对象 function Game(map) { this.map = map; this.food = new Food(this.map) this.snake = new Snake(this.map) } Game.prototype.go = function () { let food=this.food let snake=this.snake; food.show() snake.show() let go_time = setInterval(function () { co…