Galton box animation: Difference between revisions

Content added Content deleted
(→‎{{header|Zig}}: Works with latest compiler. Lots of possible improvements)
m (→‎{{header|J}}: don't wrap)
Line 1,609: Line 1,609:
Or, showing an entire animation sequence:
Or, showing an entire animation sequence:


<syntaxhighlight lang="j"> nxt&.>^:a: <7 (init ' ',.' ',.~ initpins) 5
<pre style="overflow-x: scroll; white-space: pre; width: 100%"> nxt&.>^:a: <7 (init ' ',.' ',.~ initpins) 5
┌─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┐
┌─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┐
│ o │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ o │ │ │ │ │ │ │ │ │ │ │ │ │ │
Line 1,625: Line 1,625:
│ * * * * * │ * * * * * │ │ │ │ │ │ │ │ │ │ │ │ │
│ * * * * * │ * * * * * │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┘</syntaxhighlight>
└─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┘</pre>


=={{header|Java}}==
=={{header|Java}}==