Langton's ant: Difference between revisions
Content added Content deleted
Line 1,374: | Line 1,374: | ||
$dir = ($dir - 1) % @dirs; |
$dir = ($dir - 1) % @dirs; |
||
} |
} |
||
$x += @dirs[$dir][0]; |
|||
$y += @dirs[$dir][1]; |
|||
} |
} |
||
say "Out of bounds after $move moves at ($x, $y)"; |
say "Out of bounds after $move moves at ($x, $y)"; |