private void BotDoMove() { // Try to solve List <Match3.PossibleMove> possibleMoveList = match3.GetAllPossibleMoves(); Match3.PossibleMove bestPossibleMove = GetBestPossibleMove(possibleMoveList); if (bestPossibleMove == null) { Debug.LogError("Bot cannot find a possible move!"); } else { match3Visual.SwapGridPositions(bestPossibleMove.startX, bestPossibleMove.startY, bestPossibleMove.endX, bestPossibleMove.endY); } }