NonoSharp 0.6.0

dotnet add package NonoSharp --version 0.6.0
                    
NuGet\Install-Package NonoSharp -Version 0.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NonoSharp" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NonoSharp" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="NonoSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NonoSharp --version 0.6.0
                    
#r "nuget: NonoSharp, 0.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NonoSharp@0.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NonoSharp&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=NonoSharp&version=0.6.0
                    
Install as a Cake Tool

NonoSharp

A feature-rich Nonogram library for .NET10.0 featuring Nonogram puzzle playing, randomly generated puzzles, easy Nonogram creation, saving/loading pre-made puzzle solutions and a custom Nonogram solver.

What is NonoSharp?

NonoSharp is an API for C#, allowing for easy creation and playing of Nonogram (also known as Picross) puzzles. Nonograms are Japanese puzzles where you fill in a picture based on clues given to you. The clues, either on the left-side or top-side of the grid, show how many groups there are in a given row/column and show how many cells each group consists of. By filling the grid one cell at a time, eventually you reach the solution.

Currently the library is split into the following components:

  • Nonogram puzzle playing: Generate, load, save and play Nonogram puzzles, just like you would for any other Nonogram game.
  • Nonogram solving: Solve any Nonogram puzzle you might encounter, either by using the built-in solver.
  • Nonogram creation: Create your own Nonogram puzzles, either by using the Nonogram builder.

Features

  • A fully functional Nonogram game, complete with clue checking and various other features
  • An abstracted Nonogram API allowing for game logic to be reused in other projects
  • Custom Solver to solve any Nonogram puzzle you might encounter
  • Randomly generated puzzles guaranteed to be uniquely solvable as verified by the built-in solver
  • Custom file format optimised for file size to load and save puzzles
  • A Nonogram builder allowing you to create your own Nonogram puzzles quickly and easily
  • And more!

Documentation

Documentation for the API is found on GitHub pages for the corresponding repo, here.

Example usage

Nonogram playing

using NonoSharp;

// Creates a new random 10x10 puzzle. Generation is guaranteed to produce a solvable puzzle.
// This method is also available asynchronously via Nonogram.CreateRandomPuzzleAsync
var nonogram = Nonogram.CreateRandomPuzzle(10, 10); // (width x height)
 
// Fill in or cross a cell (coordinates are zero-indexed, (0, 0) is top-left)
nonogram.FillCell(2, 3);
nonogram.CrossCell(0, 0);
 
// Moves can be undone/redone
if (nonogram.CanUndo)
{
    nonogram.Undo();
}
 
// Check individual cell state
bool isFilled = nonogram.IsCellFilled(2, 3);
 
// Check overall progress
if (nonogram.IsPuzzleSolved())
{
    Console.WriteLine("Solved!");
} 
else 
{
    Console.WriteLine("Not solved :(");
}

 
// The clues shown alongside the grid (e.g. "3 1" for a row) are available for building your own UI
Clues[] columnClues = nonogram.ColumnClues;
Clues[] rowClues = nonogram.RowClues;

// There are also some events provided
nonogram.CellStateChanged += (s, e) => {
    Console.WriteLine("A cell has changed states");
};

Nonogram creation

NonoSharp's NonogramBuilder class allows you to create your own Nonogram puzzles quickly and easily, while ensuring puzzles remain uniquely solvable.

using NonoSharp;

NonogramBuilder builder = NonogramBuilder.FromString(
    " O O \n" +
    "     \n" +
    "     \n" +
    "O   O\n" +
    "OOOOO",
    "Smiley");

if (builder.IsSolvable())
{
    Nonogram puzzle = builder.ToNonogram();
    puzzle.SaveAsFile("smiley.ns");
}

Solving Nonograms

As mentioned, NonoSharp comes with a custom Nonogram solver. This can be used to solve any Nonogram puzzle.

using NonoSharp;

Clues[] columnClues =
[
    new Clues(3),
    new Clues(1),
    new Clues(3),
];
Clues[] rowClues =
[
    new Clues(3),
    new Clues(1, 1),
    new Clues(1, 1),
];

var solvable = Solver.IsSolvable(3, 3, columnClues, rowClues, out var solution);

Source code

The full repository can be found on GitHub. NonoSharp is paired with an example UI consumer built on top of .NET MAUI, found on the GitHub NonoSharp-Maui repo.

License

This project is licensed under the MIT License. See the LICENSE file included in the package or on the GitHub repo for more information.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 131 9/28/2026
0.5.1 124 9/21/2026
0.5.0 128 9/14/2026
0.4.1 150 9/9/2026
0.4.0 130 9/3/2026
0.3.0 130 8/28/2026
0.2.1 128 8/26/2026
0.2.0 123 8/26/2026
0.1.1 126 8/25/2026
0.1.0 140 8/24/2026