takuzu

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: 5 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 {
	Size  int        `json:"size"`
	Field [][]string `json:"field"`
	Task  [][]string `json:"task"`
}

func NewCore

func NewCore(size int) (*Core, error)

Create a new instance of Takuzu Core with given size

func (*Core) Generate

func (tc *Core) Generate()

Generate a new Takuzu field

func (*Core) Prepare

func (tc *Core) Prepare(fillFactor int) error

Prepare a new Takuzu task based on already generated field with given fill factor

func (*Core) Verify

func (tc *Core) Verify() (*VerificationResult, error)

Verify a current Takuzu task

type VerificationResult

type VerificationResult struct {
	IsValid  bool     `json:"isValid"`
	Message  string   `json:"message"`
	Position []string `json:"position"`
}

Jump to

Keyboard shortcuts

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