Maintain history; use state

This commit is contained in:
Madison Rye Progress
2025-09-13 20:58:36 -07:00
parent bef9cd248e
commit f3b3803535
7 changed files with 63 additions and 12 deletions

View File

@ -38,6 +38,11 @@ func (f *field) String() string {
return string(f.cells)
}
// cell returns the raw cell (a byte) at the given point.
func (f *field) cell(p Point) cell {
return f.cells[f.i(p)]
}
// state returns whether or not the cell is alive.
func (f *field) state(p Point) bool {
return f.cells[f.i(p)].state()