예제 #1
0
        public async Task <ChessMove> GetBestMoveAsync(PieceColor color, int depth, bool isCheck)
        {
            int       boardstates = ChessLogic.BoardStatesChecked;
            ChessMove bestMove    = await Task.Run(() => ChessLogic.GetBestMove(grid, color, depth, isCheck, out float highscore));

            Debug.Log(string.Format("evalulated {0} boardstates", ChessLogic.BoardStatesChecked - boardstates));
            return(bestMove);
        }
예제 #2
0
 public List <ChessMove> GetPossibleMoves(ChessPiece piece)
 {
     return(ChessLogic.GetMoves(grid, piece, true));
 }
예제 #3
0
 public float GetValue(PieceColor color)
 {
     return(ChessLogic.GetStateValue(grid, color));
 }
예제 #4
0
 public CheckStatus CheckForCheck(PieceColor friendly, PieceColor enemy)
 {
     return(ChessLogic.CheckForCheck(grid, friendly, enemy));
 }