曾经诺基亚的贪吃蛇风靡一时,在游戏匮乏的年代,用java实现太难,现在网页制作20行代码就做成一个简单的demo了,时代在进步啊
完整脚本代码:
<!doctype html>
<html>
<body>
<canvas id=can width=400 height=400 xss=removed></canvas>
[removed]
var sn = [ 42, 41 ], dz = 43, fx = 1, n, ctx = document.getElementById(can).getContext(2d);
functio