Skip to main content

Nonogram framework for Python

Project description

pyNonogram v1.0.0

Framework for puzzle game Nonogram. It was made thinking about projects that aim to solve puzzles. I wanted to create comprehensive library that would take some work of nonogram developers' shoulders.

It is my first package thus, reporting issues and pull request are more than appreciated.

Table of Contents

Installation

Install with pip:

pip install pyNonogram

Documentation

The documentation is available here

Usage

File extension (.non)

Example .non file:

author:Apsurt
date:31.12.23
picture:2
difficulty:2
width:5
height:5
rows:1 3 2,2 3 1 1
columns:1 3 2,3 3 1
solution:001000111011011011100010000100

Note that there is no space before nor after the colon. Separate row or column hints are separated by space character, whereas hints in the same row or column are separated with coma. For row hints in sequence are from left to right, for columns from top to bottom.

Code example

from pyNonogram import Nonogram

my_nonogram = Nonogram()
my_nonogram.load("house.non")

my_nonogram.grid.fill_row(2, 1)

my_nonogram.print()

For more elaborate examples check out GitHub

Contributing

All contributions are welcome. Just keep in mind agenda of this package, lightweight framework. Before creating pull request remember to run tests via:

python setup.py test

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyNonogram-1.0.0.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

pyNonogram-1.0.0-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page