jergason / speech-of-life

speech recognition enabled game of life
1 stars 1 forks source link

Create "Earthquake" spell #6

Open basham opened 9 years ago

basham commented 9 years ago

Start an earthquake, shifting life around the board and killing life close to the epicenter.

Perhaps triggered by something like "Let the earth quake." There are numerous biblical verses about earthquakes for inspiration.

Algorithm

  1. Pause Game of Life rules.
  2. Generate random coordinate within the board to be the epicenter.
  3. Generate random severity.
  4. Expand out from the epicenter, affecting life.
  5. The closer to the epicenter, the greater distance life is shifted, away from the epicenter. Life shifted off the game board is killed.
  6. The closer to the epicenter, the greater the chance life is killed.
  7. Start Game of Life rules.