model

package
v0.0.0-...-e8b216b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACROSS = 'A'
	DOWN   = 'D'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

type Circle struct {
	Row int `xml:"Row,attr"`
	Col int `xml:"Col,attr"`
}

type Clue

type Clue struct {
	Row       int    `xml:"Row,attr"`
	Col       int    `xml:"Col,attr"`
	Number    int    `xml:"Num,attr"`
	Direction string `xml:"Dir,attr"`
	Answer    string `xml:"Ans,attr"`
	Text      string `xml:",chardata"`
}

type Entry

type Entry struct {
	SolutionId string
	Ordinal    int
	Version    int
	Value      string
}

type Puzzle

type Puzzle struct {
	Id        string `xml:"-"`
	Type      string
	Title     string
	Author    string
	Editor    string
	Copyright string
	Publisher string
	Date      string

	Width  int `xml:"Size>Cols"`
	Height int `xml:"Size>Rows"`

	Grid         []string `xml:"Grid>Row"`
	Circles      []Circle `xml:"Circles>Circle"`
	RebusEntries []Rebus  `xml:"RebusEntries>Rebus"`
	Shades       []Shade  `xml:"Shades>Shade"`
	Clues        []Clue   `xml:"Clues>Clue"`

	Notepad string
}

type Rebus

type Rebus struct {
	Row      int    `xml:"Row,attr"`
	Col      int    `xml:"Col,attr"`
	Short    string `xml:"Short,attr"`
	Expanded string `xml:",chardata"`
}

type Shade

type Shade struct {
	Row   int    `xml:"Row,attr"`
	Col   int    `xml:"Col,attr"`
	Color string `xml:"Color,attr"`
}

type Solution

type Solution struct {
	Id       string
	PuzzleId string
	Version  int
	Entries  []Entry
}

func (*Solution) GridString

func (s *Solution) GridString() string

type SolutionMetadata

type SolutionMetadata struct {
	Id       string
	PuzzleId string
	Title    string
	Author   string
	Progress int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL