History loading

This commit is contained in:
Madison Rye Progress
2025-09-14 20:50:00 -07:00
parent 6198c794d5
commit 6b5674308e
4 changed files with 81 additions and 44 deletions

View File

@ -10,10 +10,14 @@ type field struct {
// newField returns a field of cells, all unset.
func newField(size int) *field {
return &field{
f := &field{
cells: make([]cell, size*size),
size: size,
}
for i := 0; i < size*size; i++ {
f.cells[i].clear(false)
}
return f
}
// fieldFromBytes returns a field of cells given a bytearray; it assumes that the bytearray is a square.