aoc2022

package
v0.0.0-...-f50ab9b Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AZ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
View Source
const DAY_2022_01_DATA = `3x11x24
13x5x19
1x9x27
24x8x21
14x6x11`
View Source
const DAY_2022_01_TEST_DATA = `` /* 10524-byte string literal not displayed */
View Source
const DAY_2022_02_DATA = `` /* 9999-byte string literal not displayed */
View Source
const DAY_2022_02_TEST_DATA = `A Y
B X
C Z`
View Source
const DAY_2022_03_DATA = `` /* 10035-byte string literal not displayed */
View Source
const DAY_2022_03_TEST_DATA = `` /* 149-byte string literal not displayed */

Variables

This section is empty.

Functions

func IntValue

func IntValue(c string) int

Types

type Application

type Application struct {
	CLI     *cli.CLI
	Verbose bool
}

func NewApplication

func NewApplication(cli *cli.CLI) Application

func (Application) Api

func (app Application) Api(day int) string

func (Application) GetMethod

func (app Application) GetMethod(methodName string) (reflect.Value, reflect.Value, bool)

func (Application) GetName

func (app Application) GetName() string

func (Application) GetPuzzle

func (app Application) GetPuzzle(year int, day int) utils.Puzzle

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) Summary

func (app Application) Summary(year int, day int) *utils.Summary

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) PlayGame1

func (g *D2Game) PlayGame1(game string) int

func (*D2Game) PlayGame2

func (g *D2Game) PlayGame2(game string) int

func (*D2Game) PlayRound1

func (g *D2Game) PlayRound1(round string) int

func (*D2Game) PlayRound2

func (g *D2Game) PlayRound2(round string) int

type Rucksack

type Rucksack struct {
	Left  *Compartment
	Right *Compartment
	Line  string
}

func NewRucksack

func NewRucksack(line string) *Rucksack

func (*Rucksack) Common

func (rs *Rucksack) Common() []int

func (*Rucksack) DebugCommon

func (rs *Rucksack) DebugCommon()

func (*Rucksack) Frequency

func (rs *Rucksack) Frequency() []int

func (*Rucksack) SumCommon

func (rs *Rucksack) SumCommon() int

type Y2022D3

type Y2022D3 struct {
	Rucksacks []*Rucksack
}

func (Y2022D3) Load

func (logic Y2022D3) Load(data string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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