[−][src]Crate smeagol
A library to efficiently simulate Conway's Game of Life using the HashLife algorithm.
Examples
// create a gosper glider gun let mut life = smeagol::Life::from_rle_pattern( b" 24bo11b$22bobo11b$12b2o6b2o12b2o$11bo3bo4b2o12b2o$2o8bo5bo3b2o14b$2o8b o3bob2o4bobo11b$10bo5bo7bo11b$11bo3bo20b$12b2o!", )?; // step 1024 generations into the future life.set_step_log_2(10); life.step(); // save the result life.save_png( std::env::temp_dir().join("gosper_glider_gun.png"), life.bounding_box().unwrap().pad(10), 0, )?;
Modules
node | Inner workings of |
parse | Parse different kinds of Life patterns. |
Structs
BoundingBox | A rectangular region of a Life grid. |
Life | Conway's Game of Life. |
Position | The position of a cell in a Life grid. |
Enums
Cell | A cell in a Life grid. |
Error | An error that can occur. |