Back to Yew

Game of Life Example

examples/game_of_life/README.md

0.18.0954 B
Original Source

Game of Life Example

This example boasts a complete implementation of Conway's Game of Life. You can manually toggle cells by clicking on them or create a random layout by pressing the "Random" button.

Running

This example is quite resource intensive; it's recommended that you only use it with the --release flag:

bash
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --release

Concepts

  • Uses gloo_timer to automatically step the simulation.
  • Logs to the console using the weblog crate.

Running

Run this application with the trunk development server:

bash
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --open