day_02

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1()

func Part2

func Part2()

func SubsetPower

func SubsetPower(subset Subset) int

func ValidateColor

func ValidateColor(cr Color) error

Types

type Color

type Color string
const (
	Red   Color = "red"
	Green Color = "green"
	Blue  Color = "blue"
)

type Game

type Game struct {
	ID      int
	Subsets []Subset
}

func MustParseGame

func MustParseGame(s string) *Game

func MustParseGames

func MustParseGames(sl []string) []*Game

type Subset

type Subset struct {
	Counts map[Color]int
}

func GameMinSet

func GameMinSet(g *Game) Subset

func NewSubset

func NewSubset() Subset

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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