Documentation ¶
Index ¶
- func Part1(r io.Reader) (int, error)
- func Part2(r io.Reader) (int, error)
- type Action
- type Instruction
- type Pattern
- func (p *Pattern) NLit() int
- func (p *Pattern) Toggle(r image.Rectangle)
- func (p *Pattern) Toggle2(r image.Rectangle)
- func (p *Pattern) TotalBrightness() int
- func (p *Pattern) TurnOff(r image.Rectangle)
- func (p *Pattern) TurnOff2(r image.Rectangle)
- func (p *Pattern) TurnOn(r image.Rectangle)
- func (p *Pattern) TurnOn2(r image.Rectangle)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Instruction ¶
type Instruction struct {
// contains filtered or unexported fields
}
func NewInstruction ¶
func NewInstruction(s string) (Instruction, error)
func (*Instruction) UnmarshalText ¶
func (ins *Instruction) UnmarshalText(text []byte) error
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern represents a pattern of lights.
func NewPattern ¶
func (*Pattern) Toggle ¶
Toggle toggles whether the selected lights are lit. Unlit lights are set to a brightness of 1.
func (*Pattern) TotalBrightness ¶
func (*Pattern) TurnOff2 ¶
TurnOff2 decreases the brightness of the selected lights by 1. Unlit lights are unchanged.
Click to show internal directories.
Click to hide internal directories.