Files
gogogogogram/ui/model.go
Madison Rye Progress 30812e9763 Colors...
2026-03-18 23:00:11 -07:00

33 lines
577 B
Go

package ui
import (
"os"
"git.makyo.dev/makyo/gogogogogram/state"
)
type model struct {
fieldSize, sectionSize, cellsPerSection int
state *state.State
filename string
file *os.File
clears, score, factor, track int
columnStates, rowStates [][]int
columnsCorrect, rowsCorrect []bool
}
func NewModel(sectionSize, cellsPerSection int) model {
m := model{
fieldSize: sectionSize * cellsPerSection,
sectionSize: sectionSize,
cellsPerSection: cellsPerSection,
state: state.New(sectionSize, cellsPerSection, true),
}
return m
}