Re:Simulating the Ladybug Clock Puzzle
by ludwik on Monday January 19, 2026 @01:59AM
(#46675774)
Shouldn't the code say:
Or have I misunderstood something?
[ Parent
| on HN ]
The +12 there is so that % works correctly (ie the number never becomes negative)
Re:Simulating the Ladybug Clock Puzzle
by LiamPowell on Monday January 19, 2026 @02:05AM
(#46675805)
The +12 is to keep the number positive. The direction contains the movement so a +1 wouldn't make sense.