NonoSharp 0.3.0

dotnet add package NonoSharp --version 0.3.0
                    
NuGet\Install-Package NonoSharp -Version 0.3.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.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NonoSharp" Version="0.3.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.3.0
                    
#r "nuget: NonoSharp, 0.3.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.3.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.3.0
                    
Install as a Cake Addin
#tool nuget:?package=NonoSharp&version=0.3.0
                    
Install as a Cake Tool

NonoSharp

A feature-rich Nonogram API for C#, featuring pre-made and randomly generated puzzles and custom puzzle saving/loading.

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 hints given to you. The hints, 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.

Features

  • A fully functional Nonogram game, complete with hint checking
  • An API allowing for game logic to be reused in other projects
  • Randomly generated puzzles guaranteed to be uniquely solvable as verified by the built-in solver
  • Saving and loading solutions to/from custom file format

The API

Supported features

Currently supported functions include:

  • Abstracted grid, making it easy to implement in your projects
  • Built-in undo/redo functionality
  • Checking whether the puzzle is solved
  • A hint system, together with whether a hint is completed by the user.
  • Events for cells changing states and the puzzle being solved correctly
  • Generating random uniquely solvable puzzles
  • Loading and saving puzzles to a custom file type

Documentation

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

Example usage

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

 
// The hints shown alongside the grid (e.g. "3 1" for a row) are available for building your own UI
Hints[] columnHints = game.ColumnHints;
Hints[] rowHints = game.RowHints;

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

    // Include using NonoSharp.Events to gain access to the event args
};

Full repo

The full repo 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 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.3.0 43 8/28/2026
0.2.1 43 8/26/2026
0.2.0 44 8/26/2026
0.1.1 49 8/25/2026
0.1.0 66 8/24/2026