Skip to content

Portable NuGet library/package for navigating on a tile-based 2-dimensional raster/matrix.

License

Notifications You must be signed in to change notification settings

NiclasOlofsson/astar-navigator

 
 

Repository files navigation

AStar Navigator

Build NuGet Join the chat at https://gitter.im/astar-navigator/Lobby

Portable NuGet library/package for navigating on a tile-based 2-dimensional raster/matrix.

Prerequisites

  • .NET Standard 2.1 or NET 6 or above

Installation

Install the NuGet package using the command below:

Install-Package MiNET.astar

... or search for MiNET.astar in the NuGet index.

Getting started

The code below is an example how to use the library.

using AStarNavigator;
using AStarNavigator.Algorithms;
using AStarNavigator.Providers;

var navigator = new TileNavigator(
    new EmptyBlockedProvider(),         // Instance of: IBockedProvider
    new DiagonalNeighborProvider(),     // Instance of: INeighborProvider
    new PythagorasAlgorithm(),          // Instance of: IDistanceAlgorithm
    new ManhattanHeuristicAlgorithm()   // Instance of: IDistanceAlgorithm
);

var from = new Tile(1, 2);
var to = new Tile(20, 22);

var result = navigator.Navigate(from, to); 

About

Portable NuGet library/package for navigating on a tile-based 2-dimensional raster/matrix.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%