Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks very nice. My only complaint is that all the JavaScript code is in one file, which makes it a bit harder to casually peruse (I was curious how you implemented the ghosts' AI).


You can see the whole source here : https://github.com/shaunew/Pac-Man/tree/gh-pages/src

I wonder how he compiles these files into one though ? THis is the main drawback of javascript to me at the moment : having to write everything in one big file.


Looking at the code, I'm pretty sure the contents of each file is just dropped into an IIFE. A pretty simple Ruby script would take care of this.





Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: