Skip to content

MYavuzYAGIS/Game-of-Life

Repository files navigation

Rust Web-Assembly

For the medium blog ==> Game of Life

Rust Web-Assembly

What is this?

We will build and animate Conway's Game of Life. Simply put, there is a 2D grid that hosts cells of 2 kinds: dead or alive. Cell being dead or alive is not hardcoded nor it is random. It follows logic and is dynamic. Each cell in the grid can interact with eight of its neighbours (X-axis, Y-axis and diagonal) There are some basic rules that decide whether a cell should be dead or alive in a given time t

a) Cell is alive and has less than 2 alive neighbours => Cell dies

b) Cell is alive and has 2 or 3 alive neighbours => Cell lives.

c) Cell is alive and has more than 3 alive neighbours => cell dies

d) Cell is dead and has 3 alive neighbours => Cell resurrects.

Initially, we seed the grid simultaneously through the seeding and the rules above are active, new births and deaths occur, and that also triggers another one.

🚴 Ta Da!!

img

About

{Wasm+Rust} Build and animate Conway's Game of Life

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published