jeremydouglass / rosetta_examples_p5

Example set from Rosetta Code for P5 (Processing)
Other
10 stars 2 forks source link

Game of Life #57

Closed villares closed 4 years ago

villares commented 4 years ago

The world's best known Cellular Automata, how could it be missing in Processing at Rosetta Code?

jeremydouglass commented 4 years ago

Looks really great! I'm proposing (pushing for your inspection) two minor changes --

  1. one to make the speed more inspectable
  2. another to make the mouse "draw" while pressed / dragging, and pause the animation while drawing is taking place. It uses a lock field to prevent cells from fast-cycling on and off.

Let me know if you like them or would rather drop them -- either is fine.

One note about the update to the old mouse loop code -- we don't have to loop over cells and check them for a collision, we can just compute the current cell directly from mouseX/mouseY.

villares commented 4 years ago

Great proposals! Much better! Please check if Python mode reflects them correctly.

jeremydouglass commented 4 years ago

Merged -- thanks so much!

At this point, are the examples ahead of the wiki?

villares commented 4 years ago

I have updated the Rosetta Code wiki now :)