solver

package
v0.0.0-...-594a155 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Level0 = iota
	Level1
	Level2
	Level3
	Level4
)

Maximum difficult level found on solving.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	Orig Grid
	Curr Grid
}

func ParseGrid

func ParseGrid(input string) *Game

ParseGrid parses a string of digits and dots into a game structure containing two grids: the original set up and current set up. It panics on any illegal input.

func (*Game) Solve

func (ga *Game) Solve() (int, bool)

Solve solves the current grid of the given game.

type Grid

type Grid [9][9]cell

func (*Grid) Display

func (gr *Grid) Display()

Display prints a grid.

Jump to

Keyboard shortcuts

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