Restructured the formatConfig() function do be easier to debug, understand, and hopefully expand.
Restructured the formatConfig() function do be easier to debug, understand, and hopefully expand.
Redid the structure of the class so that now future expansion will be much easier. Fixed static and dynamic values being dealt with in same function, got the rendering of initial grid to work, and made it much easier to understand and debug. Annoyingly, I lost all my work from yesterday (didn’t push I guess), so I had to redo it. Thankfully it was not much, and I was able to improve a lot too.
Here is the my nice snake game. Go play it on https://jeremygalownia.github.io/oldschool-snake/
It is a website, no mobile support yet, sorry!
I had a lot of issues starting. First I didn’t understand how to start a git (never used it, didn’t have Github). Then Hackatime wouldn’t work. Then did it in wrong folder. So my time on this is very messed up. It says i have 18min, I’ve worked for 1h7min upgrading this old project. My changes from old me: found and fixed many redundancies and inefficiencies, added no script tag.
Set up the class so I can start making the logic later! Still have to add default style injector too though, that may be annoying if user passes styled container.