day04

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParser

func NewParser() *participle.Parser[Cards]

Types

type Card

type Card struct {
	Id             int   `parser:"'Card' @Int ':'"`
	Tickets        []int `parser:"@Int+ '|'"`
	WinningNumbers []int `parser:"@Int+"`
}

type Cards

type Cards struct {
	Cards []*Card `parser:"@@*"`
}

func (*Cards) Part1

func (cards *Cards) Part1() int

func (*Cards) Part2

func (cards *Cards) Part2() int

Jump to

Keyboard shortcuts

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