public static long CalculateTotalMoveCount() { long totalMoveCount = 0; for (var i = 0; i < UciOptions.ThreadCount; i++) { totalMoveCount += ChessBoardInstances.Get(i).MoveCount; } return(totalMoveCount); }
private static ChessBoard GetHorizontalMirroredCb(ChessBoard cb) { var testCb = ChessBoardInstances.Get(1); for (var color = White; color <= Black; color++) { for (var piece = Pawn; piece <= King; piece++) { testCb.Pieces[color][piece] = Util.MirrorHorizontal(cb.Pieces[color][piece]); } } testCb.ColorToMove = cb.ColorToMove; ChessBoardUtil.Init(testCb); testCb.MoveCounter = cb.MoveCounter; return(testCb); }
private static ChessBoard GetVerticalMirroredCb(ChessBoard cb) { var testCb = ChessBoardInstances.Get(1); for (var piece = Pawn; piece <= King; piece++) { testCb.Pieces[White][piece] = Util.MirrorVertical(cb.Pieces[Black][piece]); } for (var piece = Pawn; piece <= King; piece++) { testCb.Pieces[Black][piece] = Util.MirrorVertical(cb.Pieces[White][piece]); } testCb.ColorToMove = cb.ColorToMoveInverse; ChessBoardUtil.Init(testCb); testCb.MoveCounter = cb.MoveCounter; return(testCb); }