Documentation ¶
Index ¶
- Constants
- func IntValue(c string) int
- type Application
- func (app Application) Api(day int) string
- func (app Application) GetMethod(methodName string) (reflect.Value, reflect.Value, bool)
- func (app Application) GetName() string
- func (app Application) GetPuzzle(year int, day int) utils.Puzzle
- func (app Application) Help(cli *cli.CLI)
- func (app *Application) List() string
- func (app Application) Render(cli *cli.CLI)
- func (app Application) Run(cli *cli.CLI)
- func (app Application) Summary(year int, day int) *utils.Summary
- func (app *Application) Y2022D01()
- func (app *Application) Y2022D01P1()
- func (app *Application) Y2022D01P2()
- func (app *Application) Y2022D01_Summary() *utils.Summary
- func (app *Application) Y2022D02()
- func (app *Application) Y2022D02P1()
- func (app *Application) Y2022D02P2()
- func (app *Application) Y2022D02_Summary() *utils.Summary
- func (app *Application) Y2022D03()
- func (app *Application) Y2022D03P1()
- func (app *Application) Y2022D03P2()
- func (app *Application) Y2022D03_Summary() *utils.Summary
- func (app *Application) Y20XXDXXP1Render()
- func (app *Application) Y20XXDXXP2Render()
- type Compartment
- type D2Game
- type Rucksack
- type Y2022D3
Constants ¶
const AZ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
const DAY_2022_01_DATA = `3x11x24
13x5x19
1x9x27
24x8x21
14x6x11`
const DAY_2022_01_TEST_DATA = `` /* 10524-byte string literal not displayed */
const DAY_2022_02_DATA = `` /* 9999-byte string literal not displayed */
const DAY_2022_02_TEST_DATA = `A Y
B X
C Z`
const DAY_2022_03_DATA = `` /* 10035-byte string literal not displayed */
const DAY_2022_03_TEST_DATA = `` /* 149-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
func NewApplication ¶
func NewApplication(cli *cli.CLI) Application
func (Application) Api ¶
func (app Application) Api(day int) string
func (Application) GetName ¶
func (app Application) GetName() string
func (Application) Help ¶
func (app Application) Help(cli *cli.CLI)
func (*Application) List ¶
func (app *Application) List() string
func (Application) Render ¶
func (app Application) Render(cli *cli.CLI)
func (Application) Run ¶
func (app Application) Run(cli *cli.CLI)
func (*Application) Y2022D01 ¶
func (app *Application) Y2022D01()
this is what we will reflect and call - so both parts with run. It's up to you to make it print nicely etc. The app reference has a CLI for logging.
func (*Application) Y2022D01P1 ¶
func (app *Application) Y2022D01P1()
rename this to the year and day in question
func (*Application) Y2022D01P2 ¶
func (app *Application) Y2022D01P2()
rename this to the year and day in question
func (*Application) Y2022D01_Summary ¶
func (app *Application) Y2022D01_Summary() *utils.Summary
func (*Application) Y2022D02 ¶
func (app *Application) Y2022D02()
this is what we will reflect and call - so both parts with run. It's up to you to make it print nicely etc. The app reference has a CLI for logging.
func (*Application) Y2022D02P1 ¶
func (app *Application) Y2022D02P1()
rename this to the year and day in question
func (*Application) Y2022D02P2 ¶
func (app *Application) Y2022D02P2()
rename this to the year and day in question
func (*Application) Y2022D02_Summary ¶
func (app *Application) Y2022D02_Summary() *utils.Summary
func (*Application) Y2022D03 ¶
func (app *Application) Y2022D03()
this is what we will reflect and call - so both parts with run. It's up to you to make it print nicely etc.
func (*Application) Y2022D03P1 ¶
func (app *Application) Y2022D03P1()
func (*Application) Y2022D03P2 ¶
func (app *Application) Y2022D03P2()
rename this to the year and day in question
func (*Application) Y2022D03_Summary ¶
func (app *Application) Y2022D03_Summary() *utils.Summary
func (*Application) Y20XXDXXP1Render ¶
func (app *Application) Y20XXDXXP1Render()
rename and uncomment this to the year and day in question once complete for a gold star!
func (*Application) Y20XXDXXP2Render ¶
func (app *Application) Y20XXDXXP2Render()
rename and uncomment this to the year and day in question once complete for a gold star!
type Compartment ¶
type Compartment struct { AZ []int // contains filtered or unexported fields }
func NewCompartment ¶
func NewCompartment(line string) *Compartment
type D2Game ¶
type D2Game struct {
// contains filtered or unexported fields
}
func (*D2Game) PlayRound1 ¶
func (*D2Game) PlayRound2 ¶
type Rucksack ¶
type Rucksack struct { Left *Compartment Right *Compartment Line string }
func NewRucksack ¶
func (*Rucksack) DebugCommon ¶
func (rs *Rucksack) DebugCommon()