day4

package
v0.0.0-...-c283eea Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1(cards []Card) int

Part1 calculates the total scores in the pile of cards.

func Part2

func Part2(cards []Card) int

Part2 calculates the total number of cards you end up with. A card with winning numbers wins copies of the cards below the winning card equal to the number of matches.

Types

type Card

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

func LoadCards

func LoadCards(filename string) ([]Card, error)

LoadCards loads cards from the given file.

Jump to

Keyboard shortcuts

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