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

I think you have an extra two bytes (or a bug) here:

function blocks(l) { s.map(function(p) { c.fillRect(p.x << 3, p.y << 3, 8, 8); }); }

l is ignored, so you can remove it (and the part where you pass it in from the engine). This code still works because s has global scope, but that looks like an accident.

I guess the "right" thing to do would be to rename s to l here, but when you're trying to fit stuff into 4K that's not the main concern :)

Cool program by the way, I'm impressed with how clear the code remained.



Yep, that was an accident. I've removed the parameter entirely. Nice catch!




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

Search: