day_04

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 LastWinningScore

func LastWinningScore(in Input) (int, error)

func Part1

func Part1()

func Part2

func Part2()

func WinningScore

func WinningScore(in Input) (int, error)

Types

type Board

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

func ParseBoard

func ParseBoard(srows []string, rowSize int) (*Board, error)

func ParseBoards

func ParseBoards(in string, rowSize int, colSize int) ([]*Board, error)

func (*Board) ColAllMarked

func (b *Board) ColAllMarked(colIdx int) bool

func (*Board) IsWin

func (b *Board) IsWin() bool

func (*Board) Mark

func (b *Board) Mark(number int)

func (*Board) UnmarkedSum

func (b *Board) UnmarkedSum() int

type BoardPoint

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

type BoardRow

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

func (*BoardRow) AllMarked

func (r *BoardRow) AllMarked() bool

func (*BoardRow) Mark

func (r *BoardRow) Mark(number int)

func (*BoardRow) UnmarkedSum

func (r *BoardRow) UnmarkedSum() int

type Input

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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