In this application, the drum playing pattern changes every cycle based on the "Game of Life" rules.
"Game of Life" is a simulation game invented in 1970 that uses a simple model to reproduce the processes of birth, evolution and selection of life. The rules are as follows.
1. Clicking cells changes their color from black to white or white to black.
2. When the PLAY button is clicked, cells change their color based on the following conditions at regular intervals.
- A black cell surrounded by three white cells turns white in the next cycle.
- A white cell surrounded by two or three white cells remains white in the next cycle.
- Cells that do not meet the above conditions turn black in the next cycle.
In this application, each horizontal row of cells is assigned the sound of a different part of the drum. When the PLAY button is clicked, the sounds are played in order, starting with the vertical column on the left. However, only white cells play sound, and at the end of one cycle, the color of each cell changes according to the "Game of Life" rules.