DimonSmart.MazeGenerator 1.25218.855

Prefix Reserved
dotnet add package DimonSmart.MazeGenerator --version 1.25218.855
                    
NuGet\Install-Package DimonSmart.MazeGenerator -Version 1.25218.855
                    
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="DimonSmart.MazeGenerator" Version="1.25218.855" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DimonSmart.MazeGenerator" Version="1.25218.855" />
                    
Directory.Packages.props
<PackageReference Include="DimonSmart.MazeGenerator" />
                    
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 DimonSmart.MazeGenerator --version 1.25218.855
                    
#r "nuget: DimonSmart.MazeGenerator, 1.25218.855"
                    
#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.
#addin nuget:?package=DimonSmart.MazeGenerator&version=1.25218.855
                    
Install DimonSmart.MazeGenerator as a Cake Addin
#tool nuget:?package=DimonSmart.MazeGenerator&version=1.25218.855
                    
Install DimonSmart.MazeGenerator as a Cake Tool

MazeGenerator

Demo online: https://dimonsmart.github.io/Demo/

MazeGenerator is a C# library designed to create complex mazes programmatically. This project also includes a console application demo that showcases how mazes are generated and visualized dynamically.

Features

  • Dynamic Maze Generation: Generate mazes with customizable dimensions and complexity.
  • Visualization: Console application for visualizing maze generation and pathfinding processes.
  • Extensible Architecture: Easily extendable to integrate different types of maze algorithms and visualization methods.
  • Pathfinding Support: Includes pathfinding capabilities to find routes through the mazes.

Getting Started

Prerequisites

  • .NET Core SDK (version specified or latest)

Installation

Clone the repository and navigate to the project directory:

git clone https://github.com/DimonSmart/MazeGenerator.git
cd MazeGenerator

Running the Demo

To see the MazeGenerator in action:

  • Open the solution in Visual Studio or any compatible IDE.
  • Set MazeGeneratorConsoleDemo as the startup project.
  • Build and run the application to visualize the maze generation and pathfinding.

Key Components

Classes and Interfaces
  • IMaze: Interface defining the basic structure and functionality of a maze.
  • Maze: Represents the maze structure with methods for wall creation and query.
  • Cell: Basic unit in a maze implementing the ICell interface.
  • MazeBuilder<TCell>: Generic builder class for constructing mazes with specific characteristics and algorithms.
  • MazeWaveGenerator<TCell>: Generic wave generator class for pathfinding using wave propagation in the maze.
  • MazePathFinder: Class providing pathfinding functionality within the maze using wave propagation.
  • IMazePlotter: Interface for plotting elements like walls and passages within the maze, synchronously or asynchronously.

Usage

Add a reference to the MazeGenerator project in your application. Utilize the classes to generate and manipulate mazes:

Example 1: Simple Maze Generation (No Visualization)

This example demonstrates how to generate a maze without any visualization. The MazeBuilder is invoked without a plotter, so the maze is created silently.

var maze = new Maze<Cell>(31, 21);
new MazeBuilder<Cell>(maze).Build();

Example 2: Maze Generation with Progress Visualization

In this example, the maze generation progress is visualized in the console. A MazeConsolePlotter instance is passed to the MazeBuilder to display the building process.

var maze = new Maze<Cell>(31, 21);
var mazePlotter = new MazeConsolePlotter();
new MazeBuilder<Cell>(maze, new MazeBuildOptions(0.50, 0.0)).Build(mazePlotter);

Example 3: Wave Generation for Pathfinding This example showcases the full process:

  1. Maze generation with visualization.
  2. Wave propagation for pathfinding from a start point to a target.
  3. Path building based on the generated wave.
var maze = new Maze<Cell>(31, 21);
var mazePlotter = new MazeConsolePlotter();
new MazeBuilder<Cell>(maze, new MazeBuildOptions(0.50, 0.0)).Build(mazePlotter);

var wave = new MazeWaveGenerator<Cell>(maze, mazePlotter).GenerateWave(1, 1, 29, 19);
var pathBuilder = new MazePathBuilder(wave, mazePlotter);
pathBuilder.BuildPath();

Contributions

Contributions are welcome! Please fork the repository and submit pull requests with your enhancements.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net6.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.25218.855 698 4 months ago
1.25217.1721 112 4 months ago
1.25207.1243 110 4 months ago
1.24817.745 398 10 months ago
1.24812.924 144 10 months ago
1.24808.2114 142 10 months ago
1.24807.2038 122 10 months ago
1.24807.1946 116 10 months ago
1.24806.2143 114 10 months ago
1.24806.2056 109 10 months ago
1.24804.1641 90 8/4/2024
1.24801.1815 110 8/1/2024
1.24801.1531 101 8/1/2024
1.24801.1520 102 8/1/2024
1.24731.1325 101 7/31/2024
1.24731.1030 101 7/31/2024
1.24731.1007 100 7/31/2024
1.24731.939 88 7/31/2024
1.24731.929 90 7/31/2024