◀ explicit-nothingness

Explicit Nothingness

Carve out a quadrant of emptiness, let the rainbow fill the rest! ᕙ(⇀‸↼‶)ᕗ

← 01-replicube-tutorial-projects

#1 on the code size leaderboard!

Explicit Nothingness

GridCode SizeLeaderboardCyclesLeaderboardDate
7x7x710🏆 #15.673#86152026-02-23

Solution

return x|z<0 and y+7

How it works

x|z (bitwise OR) is negative whenever at least one of x, z is negative, because the sign bit propagates through OR. So x|z<0 is a compact way to check “are we outside the x>=0, z>=0 quadrant?”

When true, we return y+7 which maps each y-level to a different color:

yy+7Color
-34PEACH
-25PINK
-16PURPLE
07RED
18ORANGE
29YELLOW
310LIGHTGREEN

When both x and z are non-negative, the and short-circuits to false which means empty. Bitwise ops doing the heavy lifting again ✧