From c1849faf1c9960b3d58d1a88e6406b1500255b3a Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Tue, 2 Jan 2018 16:28:42 -0600 Subject: [PATCH] Add files via upload --- snake/snake.css | 4 ++-- snake/snake.html | 9 +++++++-- snake/snake.js | 10 ---------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/snake/snake.css b/snake/snake.css index 60d6040..4d4142e 100644 --- a/snake/snake.css +++ b/snake/snake.css @@ -7,12 +7,12 @@ body{ width: calc(95% - 2px); margin-top: 5%; border: 1px white solid; - /*border-radius: 4px;*/ + border-radius: 4px; } @media only screen and (min-width: 1000px) { #board{ width: 1000px; - /*border-radius: 8px;*/ + border-radius: 8px; } } diff --git a/snake/snake.html b/snake/snake.html index a512098..7cd817f 100644 --- a/snake/snake.html +++ b/snake/snake.html @@ -1,10 +1,15 @@ - - + + +
Game is controlled via WASD. Running into the edge or youself results in death and starting over. You are the red snake, hunting the green snack causing the snake to grow. You are never able to slow down; you have no regrets, and you remain hungry.
+
+
+
+
diff --git a/snake/snake.js b/snake/snake.js index b28f630..1a6e013 100644 --- a/snake/snake.js +++ b/snake/snake.js @@ -43,16 +43,6 @@ function update(canvas, canvas_context, snek){ function paint_background(canvas, canvas_context){ canvas_context.fillStyle = "white"; canvas_context.fillRect(0,0, canvas.width, canvas.height); - paint_board(canvas, canvas_context); -}; - -function paint_board(canvas, canvas_context){ - canvas_context.fillStyle = "grey"; - for (var i=0; i < canvas.width; i += block_size + block_space){ - for(var j=0; j < canvas.height; j += block_size + block_space){ - canvas_context.fillRect(i, j, block_size, block_size); - } - } }; const Direction = {