note + fix bug

This commit is contained in:
cjdenio committed 2026-10-03 10:46:20 -06:00
1 parent d50b572fb5
commit 6242535184
4 files changed
+28 -3

No files matched your search

+2
View File
@@ -21,6 +21,7 @@ type iPuzFile struct {
Title string `json:"title"`
Author string `json:"author"`
Copyright string `json:"copyright"`
Notes string `json:"notes"`
Puzzle [][]any `json:"puzzle"`
Solution [][]string `json:"solution"`
Dimensions iPuzDimensions `json:"dimensions"`
@@ -68,6 +69,7 @@ func ParseIPuz(file []byte) (*Puzzle, error) {
puzzle.Title = parsed.Title
puzzle.Author = parsed.Author
puzzle.Copyright = parsed.Copyright
puzzle.Note = parsed.Notes
puzzle.Width = parsed.Dimensions.Width
puzzle.Height = parsed.Dimensions.Height
+2 -2
View File
@@ -215,11 +215,11 @@ func ParsePuz(file []byte) (*Puzzle, error) {
clues = append(clues, clue)
}
// read the "note" field, currently unused
_, err = readText(buf, string(version[0]))
note, err := readText(buf, string(version[0]))
if err != nil {
return nil, err
}
puzzle.Note = note
extraBlocks := make(map[string]*ExtraBlock)
+1
View File
@@ -29,6 +29,7 @@ type Puzzle struct {
Title string
Author string
Copyright string
Note string
Solution string
State string