public static bool CompareCastleRights(BoardScreenshot shot1, BoardScreenshot shot2) { return((shot1.rightToCastleKingsideWhite == shot2.rightToCastleKingsideWhite) && (shot1.rightToCastleQueensideWhite == shot2.rightToCastleQueensideWhite) && (shot1.rightToCastleKingsideBlack == shot2.rightToCastleKingsideBlack) && (shot1.rightToCastleQueensideBlack == shot2.rightToCastleQueensideBlack)); }
public override bool Equals(object obj) { BoardScreenshot shot = obj as BoardScreenshot; if (rightToEnPassant || shot.rightToEnPassant) { return(false); } return(CompareCastleRights(this, shot) && compareTwoBoards(screenshot, shot.screenshot)); }