Open bellaisgroovy opened 6 months ago
use similar implementation to normal board checker but generate the directions to check in with binary addition.
to get every direction you need every combination of adding and minusing x, y, z ... so:
x y z 0 0 1 0 1 0 0 1 1 1 0 0 ...
note that for combinations you also need to switch each one for -1:
x y z 1 1 1 -1 1 1 1 -1 1 1 1 -1
use similar implementation to normal board checker but generate the directions to check in with binary addition.
to get every direction you need every combination of adding and minusing x, y, z ... so:
x y z 0 0 1 0 1 0 0 1 1 1 0 0 ...
note that for combinations you also need to switch each one for -1:
x y z 1 1 1 -1 1 1 1 -1 1 1 1 -1