day02

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorCount

type ColorCount struct {
	Count int    `parser:"@Int"`
	Color string `parser:"@('red' | 'green' | 'blue')"`
}

type Draw

type Draw struct {
	ColorCounts []*ColorCount `parser:"@@ ( ',' @@ )*"`
}

type Game

type Game struct {
	Id    int     `parser:"'Game' @Int ':'"`
	Draws []*Draw `parser:"@@ (';' @@)*"`
}

func (*Game) IsLegal

func (game *Game) IsLegal(maxColors map[string]int) bool

func (*Game) Power

func (game *Game) Power() int

Jump to

Keyboard shortcuts

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