d2

package
v0.0.0-...-5f7a257 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const REAL_DATA = `` /* 10476-byte string literal not displayed */
View Source
const TEST_DATA = `` /* 320-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	ID     int
	Line   string
	Rounds []*Round
}

func NewGame

func NewGame(original string) *Game

func (*Game) Fewest

func (game *Game) Fewest() (int, int, int)

func (*Game) Passes

func (g *Game) Passes(red int, green int, blue int) bool

func (*Game) Power

func (game *Game) Power() int

type Puzzle

type Puzzle struct {
	// contains filtered or unexported fields
}

func NewPuzzle

func NewPuzzle() *Puzzle

func NewPuzzleWithData

func NewPuzzleWithData(input string) *Puzzle

func (*Puzzle) FindGames

func (puzzle *Puzzle) FindGames(red int, green int, blue int) []*Game

func (*Puzzle) GetSummary

func (puzzle *Puzzle) GetSummary() utils.Summary

func (*Puzzle) Load

func (puzzle *Puzzle) Load(input string)

func (*Puzzle) Part1

func (puzzle *Puzzle) Part1()

func (*Puzzle) Part2

func (puzzle *Puzzle) Part2()

func (*Puzzle) Run

func (puzzle *Puzzle) Run()

type Round

type Round struct {
	Red   int
	Green int
	Blue  int
}

Jump to

Keyboard shortcuts

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