difficulty

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names added in v0.0.2

func Names() []string

Names returns the names of all supported difficulties.

Types

type Difficulty

type Difficulty int

Difficulty defines the number of clues available in the Sudoku puzzle. The value corresponds to the number of blocks that are pre-filled.

const (
	None   Difficulty = 81
	Kids   Difficulty = 63
	Easy   Difficulty = 45
	Medium Difficulty = 36
	Hard   Difficulty = 27
	Insane Difficulty = 13
)

Available Difficulty values.

func From added in v0.0.2

func From(str string) Difficulty

From interprets the given difficulty in string form to the actual enum value.

func (Difficulty) BlocksFilled

func (d Difficulty) BlocksFilled() int

BlocksFilled returns the # of blocks that need to be filled to qualify for that difficulty mode.

func (Difficulty) String

func (d Difficulty) String() string

String returns a human-readable name for the Difficulty.

Jump to

Keyboard shortcuts

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