Пример #1
0
 internal static int GetAbsRankDifference(this SquareCoordinate startingCoordinate, SquareCoordinate endingCoordinate)
 {
     return(Math.Abs(startingCoordinate.GetRankDifference(endingCoordinate)));
 }
Пример #2
0
 internal static bool IsOnDiagonalAdjacentSquare(this SquareCoordinate startingCoordinate, SquareCoordinate endingCoordinate)
 {
     return(Math.Abs(startingCoordinate.GetRankDifference(endingCoordinate)) == 1 &&
            Math.Abs(startingCoordinate.GetFileDifference(endingCoordinate)) == 1);
 }