public Move getNextMove(ChessBitBoard board, Team team) { var chessMove = ai.GetNextMove(board.ToChessBoard(), team.ToChessColor()); var srcy = 7 - chessMove.From.Y; var desty = 7 - chessMove.To.Y; board.move(chessMove.From.X, srcy, chessMove.To.X, desty); var move = board.lastMove(); board.rollBackMove(); return(move); }
public bool isValidMove(ChessBitBoard board, Move move, Team team) { return(ai.IsValidMove(board.ToChessBoard(), move.ToChessMove(board, team), team.ToChessColor())); }