Langton's ant: Difference between revisions

Content added Content deleted
Line 1,875: Line 1,875:


=={{header|Processing}}==
=={{header|Processing}}==
{{incorrect|Processing|The chirality of the output is reversed, meaning the ant is turning left when the spec says it should turn right, and vice-versa.}}
Processing implementation, this uses two notable features of Processing, first of all, the animation is calculated with the draw() loop, second the drawing on the screen is also used to represent the actual state.
Processing implementation, this uses two notable features of Processing, first of all, the animation is calculated with the draw() loop, second the drawing on the screen is also used to represent the actual state.
[[File:ant-processing.png|thumb|right|Sample output]]
[[File:ant-processing.png|thumb|right|Sample output]]
Line 1,958: Line 1,959:
set(x,y,white?#ffffff:#000000);
set(x,y,white?#ffffff:#000000);
}</lang>
}</lang>

=={{header|PureBasic}}==
=={{header|PureBasic}}==
[[File:PureBasic_Langtons_ant.png|thumb|Sample display of PureBasic solution]]
[[File:PureBasic_Langtons_ant.png|thumb|Sample display of PureBasic solution]]