Documentation ¶
Overview ¶
Package ast declares puzzle types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Char ¶
type Char rune
Char uniquely identifies a color.
func (Char) MarshalText ¶
MarshalText encodes the character into UTF-8-encoded text and returns the result.
func (*Char) UnmarshalText ¶
UnmarshalText decodes the character from UTF-8-encoded text.
type Color ¶
type Color struct {
R, G, B uint8
}
Color in RGB.
func (Color) MarshalText ¶
MarshalText encodes the color into UTF-8-encoded hex string.
func (Color) RGBA ¶
RGBA returns the alpha-premultiplied red, green, blue and alpha values for the color.
func (*Color) UnmarshalText ¶
UnmarshalText decodes the color from UTF-8-encoded hex string.
type Puzzle ¶
type Puzzle struct { ID string `yaml:"id,omitempty"` Source string `yaml:"source,omitempty"` Author *Author `yaml:"author,omitempty"` Copyright string `yaml:"copyright,omitempty"` Title string `yaml:"title"` Description string `yaml:"description,omitempty"` Background Char `yaml:"background"` Colors Colors `yaml:"colors"` Clue Clue `yaml:"clue"` Goal *Goal `yaml:"goal,flow,omitempty"` }
Puzzle a puzzle in the set of puzzles.
Click to show internal directories.
Click to hide internal directories.