コード例 #1
0
ファイル: Program.cs プロジェクト: pseudoinsp/AdventOfCode18
 public bool IsNeighbour(Coordinate other)
 {
     return(Math.Abs(other.X - X) <= 1 && Math.Abs(other.Y - Y) <= 1);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: pseudoinsp/AdventOfCode18
 public int DistanceTo(Coordinate other)
 {
     return(DistanceTo(other.X, other.Y));
 }