public void RandomizeNodeConnections(int X0, int Y0, int XLoc, int YLoc, int X1, int Y1) {// Sparsely connect a node with its neighbors.
    double Azar;
    Node ctr = GetNodeFromXY(XLoc, YLoc);// get this from xloc and yloc
    ctr.CleanEverything();// clean out all dead neighbor links and routes that refer to them
    for (int vcnt = Y0; vcnt <= Y1; vcnt++) {
      for (int hcnt = X0; hcnt <= X1; hcnt++) {
        if (!((XLoc == hcnt) && (YLoc == vcnt))) {// do not connect to self
          Azar = rand.nextDouble();
          if (Azar <= RandomChangeRate) {
            Node nbr = GetNodeFromXY(hcnt, vcnt);
            Azar = rand.nextDouble();
            if (ctr.Neighbors.containsKey(nbr)) {
              if (Azar > ConnectionDensity) {
                Disconnect2Nodes(ctr, nbr);
              }
            } else {
              if (Azar <= ConnectionDensity) {
                Connect2Nodes(ctr, nbr);
              }
            }
          }
        }
      }
    }
  }