4 ms·
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
by InnocentB 15y ago
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.
- bytex64 15y agoYep, that was an accident. I've removed the parameter entirely. Nice catch!