exercises

package
v0.0.0-...-e61498d Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exercise

type Exercise struct {
	common.BaseExercise
}

Exercise for Advent of Code 2023 day 10.

func (Exercise) One

func (e Exercise) One(instr string) (any, error)

One returns the answer to the first part of the exercise.

func (Exercise) Two

func (e Exercise) Two(instr string) (any, error)

Two returns the answer to the second part of the exercise.

type Pipe

type Pipe struct {
	Pos   Point
	To    []Point
	Shape PipeShape
}

type PipeShape

type PipeShape rune
const (
	NoPipe         PipeShape = '.'
	VerticalPipe   PipeShape = '|'
	HorizontalPipe PipeShape = '-'
	NECornerPipe   PipeShape = 'L'
	NWCornerPipe   PipeShape = 'J'
	SWCornerPipe   PipeShape = '7'
	SECornerPipe   PipeShape = 'F'
	StartPipe      PipeShape = 'S'
	InvalidPipe    PipeShape = 'X'
)

func GetShape

func GetShape(r rune) PipeShape

func (PipeShape) String

func (i PipeShape) String() string

type Point

type Point struct {
	X, Y int
}

Jump to

Keyboard shortcuts

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