TowhidKashem / snake-game

Classic snake game built in Vanilla JavaScript using the Canvas API

Home Page:https://towhidkashem.github.io/snake-game/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snake Game in Vanilla JavaScript

alt text

Note: this was built and only tested on the latest version of Chrome on a Windows 10 desktop. Also the project doesn't have any external dependencies, the package.json and node_modules is for enabling support for publishing to github pages where the demo is hosted.

I got a little too into the project and ended up spending longer than the suggested 3 hours. Having never made a game before or worked with the Canvas API it was an interesting project for me.

Overall I'm happy with the way it turned out, the main area of improvement is of course reducing the bloated single class into separate modules (for example a separate class to handle the welcome screen and it's related actions, etc).

Also I would have liked to use SASS in the project and made the page responsive on mobile.

About

Classic snake game built in Vanilla JavaScript using the Canvas API

https://towhidkashem.github.io/snake-game/


Languages

Language:JavaScript 65.7%Language:CSS 26.0%Language:HTML 8.3%