Initial commit: it compiles?
This commit is contained in:
29
model/model.go
Normal file
29
model/model.go
Normal file
@ -0,0 +1,29 @@
|
||||
package model
|
||||
|
||||
type Model struct {
|
||||
size, section, perSection int
|
||||
field, view int
|
||||
marks, flags int
|
||||
correct, sections, completed int
|
||||
clears, score, factor, track int
|
||||
cursor int
|
||||
|
||||
columnStates, rowStates [][]int
|
||||
columnsCorrect, rowsCorrect []bool
|
||||
|
||||
history []string
|
||||
}
|
||||
|
||||
func New(section, perSection int) (Model, error) {
|
||||
m := Model{
|
||||
size: section * perSection,
|
||||
section: section,
|
||||
perSection: perSection,
|
||||
}
|
||||
|
||||
for i := 0; i < section*section; i++ {
|
||||
m = m.randomizeSection(i)
|
||||
}
|
||||
|
||||
return m, nil
|
||||
}
|
||||
Reference in New Issue
Block a user