lifegame 0.3.18

A simple implementation of the classic cellular automaton, Conway's Game of Life.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::Filter;
use crate::biosquare::Cell;

#[derive(Debug, PartialEq, Eq)]
pub struct Block;

impl Filter for Block {
    fn filter(&self, cell: Cell) -> &str {
        match cell {
            Cell::Dead => "  ",
            Cell::Alive => "██",
        }
    }
}