用原用JS寫一個貪食蛇

第一步,寫好一個盒子(讓蛇在裏面走),寬 800 p x,高 600 p x; 第二步,寫一個食特的構造函數 Function food(){ this.width = width || 20; this.height = height || 20; this.backgroundColor = bgc || 「green」; this.left = 0; this.bottom = 0; } 一
相關文章
相關標籤/搜索