root/src/BRAINSFramework/PathFinding/NodeComparer.cs
using System;
using System.Collections.Generic;
using System.Text;
namespace Brains.Framework.PathFinding
{
public class NodeComparer : IComparer<PathfinderNode>
{
public int Compare(PathfinderNode nodeA, PathfinderNode nodeB)
{
if (nodeA.F > nodeB.F)
return 1;
else if (nodeA.F < nodeB.F)
return -1;
return 0;
}
}
} |