grid_world 0.0.3 copy "grid_world: ^0.0.3" to clipboard
grid_world: ^0.0.3 copied to clipboard

outdated

A toolkit for playing with Conway's Game of Life at the command line.

Grid World #

A dart implementation of Conway's game of life.

GridWorld is an NxM grid of cells that can be alive or dead. A GridWorld accepts an Evolver to evolve it forward in time.

A ConwayEvolver is an Evolver embodying Conway's game of life rules.

The ConwayEvolver also defines some static strings representing famous Conway GOL patterns, e.g. the Gosper glider gun:

  static final gosperGliderGun = GridWorld.fromString('''
......................................
.........................#............
.......................#.#............
.............##......##............##.
............#...#....##............##.
.##........#.....#...##...............
.##........#...#.##....#.#............
...........#.....#.......#............
............#...#.....................
.............##.......................
......................................
''');

Worlds can be built by sending these patterns into GridWorld composition methods.

Printers are provided that convert a GridWorld to a printable string, including strings that include ANSI escape sequences to animate the world on terminals.

Demo:

git clone git@github.com:monopole/grid_world.git
dart grid_world/example/main.dart
1
likes
0
pub points
0%
popularity

Publisher

verified publisherorangebike.dev

A toolkit for playing with Conway's Game of Life at the command line.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

test

More

Packages that depend on grid_world