DEV Community

Pontakorn Paesaeng
Pontakorn Paesaeng

Posted on

I build a minimal Conway's Game of Life with JavaScript

It's minimal version I can come up with for now. Currently, starting positions of cells are hard coded. But, the game is working correctly.

I wish to add a feature where I can toggle cell by clicking. I see why Conway's game of life become an example project for WASM with Rust. It's difficult to do it efficiently. For example, to change state of the grid, I created a whole new array just to store next state. It can be done more efficiently by storing change instead.

The code is not really consistent for now. But, I will left it be because I need to reference it when I improve the code in another project.

Top comments (0)

Image of PulumiUP 2025

Let's talk about the current state of cloud and IaC, platform engineering, and security.

Dive into the stories and experiences of innovators and experts, from Startup Founders to Industry Leaders at PulumiUP 2025.

Register Now