public Move MakeMove(CheckersBoard currentBoard, GameVariant variant, List <Move> gameMoves) { Random random = new Random(); List <Move> allPossibleMoves = currentBoard.GetAllPossibleMoves(Color); int count = allPossibleMoves.Count; if (count == 0) { throw new NotAvailableMoveException(Color); } int elemIndex = MakeMoveGpu((char)currentBoard.Size, Color == PieceColor.White ? 0 : 1, currentBoard.GetBoardArray(), GetPossibleMovesArray(allPossibleMoves), MctsIterationCount, GridSize, BlockSize, variant == GameVariant.Checkers ? 0 : 1); return(allPossibleMoves[elemIndex]); }