using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace RichCreator.Utility.PathFindings
|
{
|
|
//A class used to store the position information
|
public struct Point2
|
{
|
public Point2(int x, int y)
|
{
|
this.x = x;
|
this.y = y;
|
}
|
|
public int x { get; set; }
|
|
public int y { get; set; }
|
|
public override bool Equals(object obj)
|
{
|
Point2 p = (Point2)obj;
|
return this.x == p.x && this.y == p.y;
|
}
|
|
public override int GetHashCode()
|
{
|
return x ^ (y * 256);
|
}
|
|
public override string ToString()
|
{
|
return x + "," + y;
|
}
|
|
public static bool operator ==(Point2 a, Point2 b)
|
{
|
return a.Equals(b);
|
}
|
|
public static bool operator !=(Point2 a, Point2 b)
|
{
|
return !a.Equals(b);
|
}
|
}
|
}
|