Langton's ant: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: move the defined test into the switch; we really use a quarter of the output area, not 50%) |
m (→{{header|Perl 6}}: the vectors are also constant) |
||
Line 1,359: | Line 1,359: | ||
{{trans|Perl}} |
{{trans|Perl}} |
||
In this version we use 4-bits-per-char graphics to shrink the output to a quarter the area of ASCII graphics. |
In this version we use 4-bits-per-char graphics to shrink the output to a quarter the area of ASCII graphics. |
||
<lang perl6> |
<lang perl6>constant @vecs = [1,0,1], [0,-1,1], [-1,0,1], [0,1,1]; |
||
constant @blocky = ' ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█'.comb; |
constant @blocky = ' ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█'.comb; |
||
constant $size = 100; |
constant $size = 100; |