sudoku

package
v0.0.0-...-5cc4ecd Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core struct {
	Grid [9][9]int `json:"grid"`
	Task [9][9]int `json:"task"`
}

func NewCore

func NewCore() *Core

Create a new instance of Sudoku Core

func (*Core) Generate

func (sc *Core) Generate()

Generate a new Sudoku 9x9 grid

func (*Core) Prepare

func (sc *Core) Prepare(fillFactor int)

Prepare a new Sudoku task based on already generated grid

func (*Core) Verify

func (sc *Core) Verify() *VerificationResult

Verify a current Sudoku task

type VerificationResult

type VerificationResult struct {
	IsValid  bool   `json:"isValid"`
	Position string `json:"position"`
}

Jump to

Keyboard shortcuts

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