4 ms·
lines like: dx = (e.keyCode - 38) % 2, dy = (e.keyCode - 39) % 2; is cheating. In that case, you could probably make it 1 line of javascript.
by kennethkl 13y ago
lines like: dx = (e.keyCode - 38) % 2, dy = (e.keyCode - 39) % 2; is cheating. In that case, you could probably make it 1 line of javascript.
- jlas 13y agoI agree, there are like 7 lines that bunch together logic using commas. This one has three operations in one line: newEl.className = newEl.className.replace(' f', ''), length++, hasFood = false;