Starting on UI. Coverage no longer 100% :c
This commit is contained in:
32
ui/model.go
Normal file
32
ui/model.go
Normal file
@ -0,0 +1,32 @@
|
||||
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),
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
Reference in New Issue
Block a user