d20

package
v0.0.0-...-3cf76cc Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// N ..
	N direction = iota
	// E ..
	E
	// S ..
	S
	// W ..
	W
)

Variables

This section is empty.

Functions

func ParseInput

func ParseInput(f []byte) (map[int]*Tile, error)

ParseInput ..

func SolvePart1

func SolvePart1(tiles map[int]*Tile) (int, error)

SolvePart1 ..

func SolvePart2

func SolvePart2(tiles map[int]*Tile) (int, error)

SolvePart2 ..

Types

type Tile

type Tile struct {
	ID        int
	Data      [][]bool
	Edges     map[direction]string
	Neighbors map[direction]int
}

Tile ..

func NewTile

func NewTile(id int, data [][]bool) (*Tile, error)

NewTile ..

Jump to

Keyboard shortcuts

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