model

package
v0.0.0-...-48edbc6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPinsPerLine = 31
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Coord

type Coord struct {
	Row Dimension
	Col Dimension
}

type Difficulty

type Difficulty uint8

func (Difficulty) String

func (d Difficulty) String() string

type Dimension

type Dimension uint8

func (Dimension) Bit

func (d Dimension) Bit() DimensionBit

type DimensionBit

type DimensionBit uint64

type Iterator

type Iterator int
const (
	MinIterator Iterator = 0
	MaxIterator Iterator = 11
)

func (Iterator) GetDifficulty

func (i Iterator) GetDifficulty() Difficulty

func (Iterator) GetHeight

func (i Iterator) GetHeight() Size

func (Iterator) GetWidth

func (i Iterator) GetWidth() Size

func (Iterator) String

func (i Iterator) String() string

func (Iterator) Valid

func (i Iterator) Valid() bool

type Node

type Node struct {
	Coord
	Num int
}

type Size

type Size uint8

type Solution

type Solution struct {
	Height Size
	Width  Size

	Horizontals [MaxPinsPerLine]DimensionBit
	Verticals   [MaxPinsPerLine]DimensionBit
}

func (*Solution) Pretty

func (s *Solution) Pretty(
	nodes []Node,
) string

func (*Solution) String

func (s *Solution) String() string

Jump to

Keyboard shortcuts

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