[原] html5 canvas 贪吃蛇小游戏~~
自己写的贪吃蛇小游戏用canvas做的,没有引用excanvas.js所以不支持ie ~ 还有同时按多个方向键会有bug, 喜欢的复值 code拿去玩吧~ 算法上也可以用 正则 判断数组是否有重复,不一定要用循环,性能上会更好 :) */ /*--> */ 代码 <! Doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd" > < html xmlns ="http://www.w3.org/1999/xhtml" lang ="gb2312" > < head > < title > - S n a k e - </ title > < meta http-equiv ="content-type" content ="text/html; charset=gb2312" /> < meta name ="author" content ="Aissa" /> < meta name ="keywords" content ="" /> < meta name ="description" content ="" /> < style type ="text/css" > body {