BlueBoxes.WordSearchBuilder 1.0.1

dotnet add package BlueBoxes.WordSearchBuilder --version 1.0.1                
NuGet\Install-Package BlueBoxes.WordSearchBuilder -Version 1.0.1                
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="BlueBoxes.WordSearchBuilder" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlueBoxes.WordSearchBuilder --version 1.0.1                
#r "nuget: BlueBoxes.WordSearchBuilder, 1.0.1"                
#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.
// Install BlueBoxes.WordSearchBuilder as a Cake Addin
#addin nuget:?package=BlueBoxes.WordSearchBuilder&version=1.0.1

// Install BlueBoxes.WordSearchBuilder as a Cake Tool
#tool nuget:?package=BlueBoxes.WordSearchBuilder&version=1.0.1                

About

This package allow you to build, solve and export wordsearch puzzles in the iPuz json format.

Words are be placed at random horizontally, vertically or diagonally both forwards and backwards. The wordsearch can be any size, and the words to be found can be of any length.

How to Use

The wordsearch builder allows adding words to the wordsearch grid, upon calling Build it fills the spaces with random letters.

var puzzleDef = new WordSearchBuilder(10, 10)
    .WithWords("Apple", "Orange", "Grape")
    .Build();

To render the results you can loop over the grid.

for(var row = 0; row < puzzleDef.Dimensions.Height; row++)
{
    for(var col = 0; col < puzzleDef.Dimensions.Width; col++)
    {
        Console.Write(puzzleDef.Puzzle[col][row]);
    }
    Console.WriteLine();
}

The puzzle definition also includes the solution. Items that could not be placed are not included in the solution.

foreach(var word in puzzleDef.Solution)
{
    Console.WriteLine($"{word.Word} ({word.Direction} from {word.StartCell.Col}, {word.StartCell.Row})");
}

Additional Documentation

More examples of usage and sample projects can be found on the Projects GitHub

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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
1.0.1 280 12/2/2023