JLannoo / Hexagonal-Game-of-Life

Conway's Game of Life but it's hexagonal

Home Page:https://jlannoo.github.io/Hexagonal-Game-of-Life/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⬡⬢ Conway's Game of Life but with Hexagons ⬢⬡

This is a simple implementation of Conway's Game of Life, but with hexagons instead of squares.

It's written in Typescript using the p5.js library with the p5.ts scaffold that I wrote.

I tweaked the rules to accomodate the different geometry. Instead of 8 neighbors, each cell has 6 neighbors. The rules are as follows:

  • Any live cell with 0 or 1 live neighbors dies.
  • Any live cell with 3 or 4 live neighbors lives.
  • Any live cell with 5 or more live neighbors dies.
  • Any dead cell with exactly 2 live neighbors becomes alive.

About

Conway's Game of Life but it's hexagonal

https://jlannoo.github.io/Hexagonal-Game-of-Life/

License:MIT License


Languages

Language:TypeScript 62.7%Language:HTML 16.7%Language:CSS 12.9%Language:JavaScript 7.7%