This commit adds the generation function, which:
- Takes the current grid arena as input.
- Creates a new temporary grid.
- Applies Conway's Game of Life rules to compute the next state.
- Replaces the original grid with the updated one.
Conway's Game of Life rules:
- A live cell dies if it has fewer than 2 or more than 3 live neighbours.
- A live cell survives if it has 2 or 3 live neighbours.
- A dead cell becomes alive if it has exactly 3 live neighbours.
It introduces a new `count` function that take:
- the grid arena
- X and Y as `isize`
It counts how many nearby cells are alive at a specified position and returns the total.
This commit introduces a new `display` function:
- It takes an immutable reference to a grid of bool values
- It takes mutable reference to a String buffer.
it writes to the buffer, `X` or `.` depending on the grid's bool element.