◀ diagonal-line

Diagonal Line

A single green line cutting through the cube corner to corner ⸜(。˃ ᵕ ˂ )⸝♡

← 02-intro-challenges-1

#1 on the code size leaderboard!

Diagonal Line

GridCode SizeLeaderboardCyclesLeaderboardDate
7x7x710🏆 #14.163#81582026-02-23

Solution

return x==y and y==z and 11

How it works

The diagonal line is every voxel where all three coordinates are equal. Chain two equality checks with and, then and 11 for GREEN. When either check fails, the whole chain short-circuits to false (empty). Clean!