Created
December 18, 2022 14:28
-
-
Save iomonad/692752be68dcd9af8ae4f8dcaa80aa06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iterate over disk pack in binding order looking for any disk not within true-jiggle range of *any* gate (a disk that is between gates) | |
if found: | |
all previous disks have true-jiggle centered on the gate they were aligned with | |
this disk has no jiggle | |
all subsequent disks have full-jiggle (can be moved from 0 up to 5) | |
return binder found | |
else: | |
all disks are in *a* gate. iterate again searching for a disk within true-jiggle of a false gate | |
if found: | |
this disk has false-jiggle | |
all other disks have true-jiggle | |
return binder found | |
else: | |
if nothing found, lock must be open. return no binders found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment