Langton's ant: Difference between revisions
Content added Content deleted
(→{{header|Perl}}: Add Perl 6.) |
|||
Line 1,345: | Line 1,345: | ||
$dir = ($dir - 1) % @dirs; |
$dir = ($dir - 1) % @dirs; |
||
} |
} |
||
$x += $dirs[$dir][0]; |
|||
$y += $dirs[$dir][1]; |
|||
} |
} |
||
print "Out of bounds after $move moves at ($x, $y)\n"; |
print "Out of bounds after $move moves at ($x, $y)\n"; |