The program crashed every time I tried to get the value of a capture move because the "captured" piece was None.
I tested if board.GetPiece(move.TargetSquare).PieceType.Equals(PieceType.None) && move.IsCapture could return true, and it can.
With the exact same bots, this bug doesn't exist in 1.1, as board.GetPiece(move.TargetSquare).PieceType.Equals(PieceType.None) && move.IsCapture is always false.
You can test this by simply using the Practice Bot from Sebastian (https://github.com/fmoeran/Practice-Bot). At line 220, if you replace if (move.isCapture) with if (!board.GetPiece(move.TargetSquare).PieceType.Equals(PieceType.None)), the bot works fine again. Which shows that the problem comes from move.isCapture.
For some reason, move.isCapture isn't reliable anymore.
The program crashed every time I tried to get the value of a capture move because the "captured" piece was None. I tested if
board.GetPiece(move.TargetSquare).PieceType.Equals(PieceType.None) && move.IsCapture
could returntrue
, and it can. With the exact same bots, this bug doesn't exist in 1.1, asboard.GetPiece(move.TargetSquare).PieceType.Equals(PieceType.None) && move.IsCapture
is alwaysfalse
.You can test this by simply using the Practice Bot from Sebastian (https://github.com/fmoeran/Practice-Bot). At line 220, if you replace
if (move.isCapture)
withif (!board.GetPiece(move.TargetSquare).PieceType.Equals(PieceType.None))
, the bot works fine again. Which shows that the problem comes frommove.isCapture
.For some reason,
move.isCapture
isn't reliable anymore.