Snake Game implemented mostly using CSS animations and abusing the DOM
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.eslintrc.json
.gitignore
README.md
demo.gif
index.html
script.js
style.css
style.css.map
style.scss

README.md

Simple game of Snake in CSS

The snake is represented as an ordered collection of list items, decorated with html-attributes - the html-attributes are recognized by the stylesheet which uses animations to make the snake move.

< 100 lines of spaghetti javascript makes sure the attributes are updated to the correct values after each animation iteration.

Why? Because inspecting the DOM while playing is mesmerizing!

Example gameplay