yesgram

package module
v0.0.0-...-cf85d10 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 3 Imported by: 0

README

Package to solve nonograms (= picross = griddlers)

Example main.go

package main

import "github.com/Socrad/yesgram"

func main() {

	rowHints := [][]int{{2, 2}, {2, 3}, {3}, {3, 5}, {1, 9, 1}, {1, 13}, {7, 5}, {3, 3}, {2, 1, 3}, {2, 3}, {2, 2}, {1, 2, 2}, {1, 2, 2, 2}, {2, 11}, {5, 5}}
	columnHints := [][]int{{2, 3}, {2, 1, 2}, {3, 2}, {1, 5, 1}, {7, 2}, {4, 4}, {3, 3}, {3, 1}, {3, 1, 3}, {3, 5}, {7, 2, 2}, {9, 2}, {3, 6, 2}, {2, 6}, {3, 5}}
 
	game := yesgram.NewGame(rowHints, columnHints)
	game.Solve()
	game.ShowBoard()
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BLOCKED = -1
View Source
var FILLED = 1
View Source
var NEUTRAL = 0

Functions

func NewGame

func NewGame(rowHints, columnHints [][]int) game
노노그램

노노그램을 생성할 때, 힌트가 칠해질 수 있는 모든 케이스를 생성해서 함께 저장

Types

This section is empty.

Jump to

Keyboard shortcuts

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