From 7e6648902b262484bc0aac824c3784b1ae4b8591 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Sun, 12 Apr 2020 14:42:03 -0500 Subject: Update games, add scores --- src/snake/index.html | 211 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 136 insertions(+), 75 deletions(-) (limited to 'src/snake/index.html') diff --git a/src/snake/index.html b/src/snake/index.html index eb11f86..ea982cf 100644 --- a/src/snake/index.html +++ b/src/snake/index.html @@ -1,83 +1,144 @@ -
+ + + + + Snake + + + + + + -
- + + function setRandomCoords(item) { + item.x = randomInt(40); + item.y = randomInt(40); + } + function randomInt(max) { + return Math.floor(Math.random() * max); + } + function font(size) { + ctx.font = size + "px Courier"; + } + function color(c) { + ctx.fillStyle = c; + } + + + + \ No newline at end of file -- cgit v1.2.3