Wave function collapse: Difference between revisions
m
→{{header|C}}: grammar
m (→{{header|J}}) |
m (→{{header|C}}: grammar) |
||
Line 192:
}</syntaxhighlight>
Note: here we use <code>R</code> where J used <code>i</code>, because we use i as an index/loop counter (other than <code>m</code>, <code>y</code> and <code>i</code>), the comments on [[#J|the j implementation]] should be directly relevant here
For simplicity, we use <tt>char</tt> as our pixel datatype (and for truth values), and <tt>int</tt> for indices (C offers a variety of similar datatypes but nothing we are doing here is big enough for that to be a concern).
|