3 ms·
I would've realised that the 16 different wall combinations would've fit well into a 4-bit encoding - e.g. 1 for left, 2 for right, 4 for up, 8 for down. That g
by userbinator 12y ago
I would've realised that the 16 different wall combinations would've fit well into a 4-bit encoding - e.g. 1 for left, 2 for right, 4 for up, 8 for down. That gets rid of the sets and reduces the check for wall existence to a simple AND.
If you have a "wall" only in one tile and not its adjacent one, that essentially creates a one-way wall, which could be an interesting effect too.