Bonus : seeding

Bonus: Seeding the Grid for the Game of Life Kata

1 - Random Seeding

  • Random Seeding: Each cell in the grid has a 1 in 3 chance of being alive.

2 - Manual Seeding (Line-by-Line)

  • Line-by-Line Seeding: Iteratively prompt the user to enter each line of the grid. Use 'X' to represent a live cell and '.' to represent a dead cell. Example:

    > xxxxx
    > xxxxx
    > xxxxx
    > xxxxx
    > xxxxx

3 - Manual Seeding (One-Line)

  • One-Line Seeding: Parse a single string input to seed the entire grid. This format is easier to share and input. Example:

    > xxxxx/xxxxx/xxxxx/xxxxx/xxxxx

Last updated