Modern Orange
Open main menu
New
Best
Ask
Show
Jobs
About
A
Story
Simulating the Ladybug Clock Puzzle
16
2
azhenley
1 day ago
austinhenley.com
ludwik
·
25 minutes ago
·
[ - ]
Shouldn't the code say:
position = (position + direction + 1) % 12;
Or have I misunderstood something?
LiamPowell
·
19 minutes ago
·
[ - ]
The +12 is to keep the number positive. The direction contains the movement so a +1 wouldn't make sense.