function random(a,b){
return Math.round(Math.random()*(a-b)+b)
}
function randomColor(){
return `rgb(${random(0,255)},${random(0,255)},${random(0,255)})`
}
var m = new Map();
var f = new Food();
f.randomPos();
var s = new Snake();
// 当按下键盘时,将按下的键盘的code值,传给蛇的专属处理方法
document.onkeydown = function(eve){
var e = eve || window.event;
var code = e.keyCode || e.which;
————————————————