Core/Refactor: Part 1

This commit is contained in:
hondacrx
2018-05-07 18:56:09 -04:00
parent b2c1554065
commit 216db1c23a
83 changed files with 298 additions and 296 deletions
+7 -2
View File
@@ -156,18 +156,23 @@ namespace Game.Maps
{
return (p1.x_coord == p2.x_coord && p1.y_coord == p2.y_coord);
}
public static bool operator !=(CellCoord p1, CellCoord p2)
{
return !(p1 == p2);
}
public override bool Equals(object obj)
{
return base.Equals(obj);
if (obj is CellCoord)
return (CellCoord)obj == this;
return false;
}
public override int GetHashCode()
{
return base.GetHashCode();
return x_coord.GetHashCode() ^ y_coord.GetHashCode();
}
public uint x_coord { get; set; }