public IEnumerable <ChessMove> GetPossibleMoves(ChessboardPosition currentPosition) { return(pieceAllowedMoves.GetPossibleMoves(currentPosition)); }
public bool IsMoveAllowed(ChessboardPosition currentPosition, ChessboardPosition targetPosition) { return(GetPossibleMoves(currentPosition).Any(move => move.To.Equals(targetPosition))); }
// TODO Consider creating a base class for value types with compare by value semantics. #region Equals & GetHashCode protected bool Equals(ChessboardPosition other) { return(X == other.X && Y == other.Y); }