Skip to content

TakenPilot/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is literally an implementation of the classic game of snake.

It's built in Vanilla JavaScript, edited only in the Chrome browser's debugger. I discovered I could edit files directly in Chrome one morning and this is the result.

The first thing to note is that I was able to use software patterns to complete this project in a very fast amount of time. There isn't actually that much code here compared to what it does. I copy and pasted a bit once certain patterns were established, but if I had more time that would all go away.

The second thing to note is that I didn't use any IDE except the Chrome debugger, any build tools, linters or testing software. Whether or not I get an interview for this job, I wanted to see how far I've come since my early days when it took me a week to make a simple game.

I also didn't comment as much as normal because this is essentially hobby code. I made a note or two when I suddenly changed the structure.

To run the code, open it up in the latest Chrome browser. It's also hosted on https://light-ci.com because that domain was free and I wanted to play with a cool new Go program called Caddy and new Terraform configuration, which I was also playing around with on Sunday.

I kind of cheated a bit, because I made a really nice menu but in the end I didn't have enough items to show off the menu on the opening splash screen, so I tacked on the credits and high score screens after work (Monday, Tuesday'ish). I also didn't have a death menu by the end of the time on Sunday -- it just said "You accomplished death" in a somewhat rogue-like manner requiring a page refresh. The rest of the code was made in the appropriate time on Sunday, including the level win menu. This can be verified with git.

I think it's funny that the actual gameplay only took an hour. Everything else is menus, and just playing around with different sizes of screens.

About

Implementation of the classic game of snake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published