lifers-raylib 0.1.1

Raylib frontend for lifers
docs.rs failed to build lifers-raylib-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: lifers-raylib-0.2.0

lifers-raylib

Raylib frontend for lifers.

Usage

To use this frontend, simply create a cell type:

// Simple Game of Life-like cell
struct Cell {
    is_alive: bool
}

Your cells don't have to be this simple, they can have many attributes (type, group, etc.).

Now just implement RenderCell<Color> for it:

use raylib::color::Color;
use lifers::frontend::RenderCell;

impl RenderCell<Color> for Cell {
    fn render_cell(&self) -> Color {
        if cell.is_alive {
            Color::WHITE
        } else {
            Color::BLACK
        }
    }
}

Then you can use it to create an Automaton and pass it to RaylibFrontend (or use FrontendBuilder).

Also, see examples and docs.