nonogram

package
v0.0.0-...-c4806bb Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGame

func NewGame(size int32, checked, revealed float64) *game

Types

type Board

type Board interface {
	Size() int32
	Count(Cell) int
	Percent(Cell) float32
	Get(x, y int32) Cell
	Set(x, y int32, cell Cell) error
	Column(x int32) []uint8
	ColumnStr(x int32) string
	Line(x int32) []uint8
	LineStr(x int32) string
	RevealColumn(x int32)
	RevealLine(y int32)
	Eq(other Board) bool
}

func NewBoard

func NewBoard(size int32) Board

func NewRandomBoard

func NewRandomBoard(size int32, checked float64) Board

type Cell

type Cell byte
const (
	CellUnknown Cell = iota
	CellUnset
	CellSet
)

func (Cell) IsFilled

func (c Cell) IsFilled() bool

func (Cell) IsSet

func (c Cell) IsSet() bool

func (Cell) IsUnknown

func (c Cell) IsUnknown() bool

func (Cell) IsUnset

func (c Cell) IsUnset() bool

func (Cell) String

func (c Cell) String() string

type Game

type Game interface {
	Check(x, y int32)
	IsDone() bool
	Reference() Board
	Round() Board
}

Jump to

Keyboard shortcuts

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