nature-of-code / noc-examples-p5.js-archived

Port to p5.js of Nature of Code examples
MIT License
1.05k stars 552 forks source link

Condense this.rules function #107

Open jakefrancis opened 3 years ago

jakefrancis commented 3 years ago

The this.rules function was condensed in an identical manner suggested by the java implementation comment above the this.rules function.

The previous implementation assigned the binary values backwards, i.e. 7 == index0, 6 === index1, etc.

This condensed version assigns them in order.

I wasn't sure if this was intentional, it appears the ruleset is randomized so from my understanding this won't make a difference.