[][src]Module ca_formats::plaintext

A parser for PlainText format.

Example

use ca_formats::plaintext::Plaintext;

const GLIDER: &str = r"!Name: Glider
!Author: Richard K. Guy
!The smallest, most common, and first discovered spaceship.
!www.conwaylife.com/wiki/index.php?title=Glider
.O
..O
OOO";
let mut glider = Plaintext::new(GLIDER).collect::<Result<Vec<_>, _>>().unwrap();
assert_eq!(glider, vec![(0, 1), (1, 2), (2, 0), (2, 1), (2, 2)]);

Structs

Plaintext

An iterator of coordinates of living cells. Returns by parsing a PlainText file.