A parser for Conway’s Game of Life Lexicon

Overview

Lexicon

Crates.io Rust

A convenient interface to get patterns from the Lexicon and use them in your implementation of Conway’s Game of Life.

Used by Lifeee, my web app implementation of Conway’s Game of Life, check it out!

Usage

let lexicon = lexicon::Lexicon::get();
assert_eq!(lexicon.terms.len() > 0, true);

let glider = lexicon.get_term("glider".to_string()).unwrap();
assert_eq!(glider.width, 3);
assert_eq!(glider.height, 3);
assert_eq!(glider.cells, vec![
  lexicon::Cell { x: 0, y: 0 },
  lexicon::Cell { x: 1, y: 0 },
  lexicon::Cell { x: 2, y: 0 },
  lexicon::Cell { x: 0, y: 1 },
  lexicon::Cell { x: 1, y: 2 }
]);

Regenerate a bin file after an update of the text version

cargo run will read the file res/lexicon.txt, parse it and serialize the result into res/lexicon.bin, which will be used by the library then.

You might also like...
A game of life🔬 simulator on an infinite♾️ plane
A game of life🔬 simulator on an infinite♾️ plane

game-of-life A game of life 🔬 simulator on an infinite ♾️ plane NOTE: This is a toy project! I did this just for fun, not as a packaged product. Abou

An implementation of the Game of Life

Lifeee – An implementation of the Game of Life I realized this application to keep learning Rust, discover the front-end library Yew, and because I’m

Game Of Life using webgpu, written in Rust
Game Of Life using webgpu, written in Rust

Game of Life using webgpu ✨ Description This is the implementation of the tutorial Your first WebGPU app in Rust where we're using webgpu to implement

Solana Game Server is a decentralized game server running on Solana, designed for game developers

Solana Game Server* is the first decentralized Game Server (aka web3 game server) designed for game devs. (Think web3 SDK for game developers as a ser

Life simulation written in rust

Life simulation written in Rust, inspired by this very old screensaver: https://sourceforge.net/projects/primlife/ Demo: https://joelthelion.github.io

Victorem - easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.

Victorem Easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust. Example Cargo.toml [dependencies] vict

2d Endless Runner Game made with Bevy Game Engine
2d Endless Runner Game made with Bevy Game Engine

Cute-runner A 2d Endless Runner Game made with Bevy Game Engine. Table of contents Project Infos Usage Screenshots Disclaimer Project Infos Date: Sept

A tetris game I wrote in rust using ncurses. I'm sure that there's a better way to write a tetris game, and the code may be sus, but it techinically works
A tetris game I wrote in rust using ncurses. I'm sure that there's a better way to write a tetris game, and the code may be sus, but it techinically works

rustetris A tetris game I wrote in rust using ncurses. I'm sure that there's a better way to write a tetris game, and the code may be sus, but it tech

A game for the game jam
A game for the game jam "1-Button Jam 2021"

One click ninja A game for the game jam "1-Button Jam 2021" written in Rust with the Bevy engine. A rhythm game, where you play a soldier that can def

Owner
Sébastien Castiel
📖✍🏻 Check out the new book I’m writing! theoutstanding.dev
Sébastien Castiel
Conway's Game of Life implemented for Game Boy Advance in Rust

game-of-life An implementation of a Conway's Game of Life environment on GBA. The ultimate game should have two modes: Edit and Run mode which can be

Shane Snover 1 Feb 16, 2022
Wasm game of life - A Rust and WebAssembly tutorial implementing the Game of Life

wasm_game_of_life Conway's Game of Life in Rust and WebAssembly Contributing | Chat Built with ?? ?? by The Rust and WebAssembly Working Group About T

Rust and WebAssembly 236 Dec 24, 2022
Conway's game of life written in Rust.

This is my implementation of Conway's game of life to get my hands dirty with Rust. Rules of the game: Any live cell with two or three live neighbors

null 0 Apr 9, 2022
A simple implementation of Conway's Game of Life using Fully homomorphic Encryption

Game of life using Fully homomorphic encryption A simple implementation of Conway's Game of Life built using Zama's concrete-boolean library. Build Ju

Florent Michel 4 Oct 3, 2022
A first-time implementation of Conway's Game of Life in Rust: Adventure and Commentary

A Commentary on Life This project documents the process and final result of my first-ever attempt at implementing Conway's Game of Life. I'll be using

Avery R. 2 Feb 25, 2022
A Conway's Game Of Life application for the gnome desktop

Game Of Life A simple Conway's game of life simulator for the Gnome desktop Installation The easieast way to install is from Flathub. Using Gnome Buil

Andrea Coronese 7 Dec 30, 2022
This is an implementation of "Game of Life" by Horton Conway in Rust using raylib.

Game-of-Life This is an implementation of "Game of Life" by Horton Conway in Rust using raylib. What is Game of Life? The Game of Life, also known sim

Berkay Sahin 3 Dec 26, 2022
Conway's Game of Life, visualised using Rust and WebAssembly

Game of Life, using Rust and WebAssembly Tutorial Built with ?? ?? by The Rust and WebAssembly Working Group About Conway's Game of Life, which consis

Vedant R. Nimje 2 Jul 11, 2023
A simple Rust and WebAssembly example implementing the Game of Life

rust-wasm-game-of-life rust-wasm-game-of-life is a simple Rust and WebAssembly example implementing the Game of Life based on Rust and WebAssembly boo

Chris Ohk 14 Nov 24, 2021
Game of life implementation written in Rust.

Game of life Game of life implementation written in Rust. Part of my journey in learning Rust. Pattern files The patterns are based on the example pat

Hashem Hashem 2 Nov 17, 2022