public ParentNode() { cn = new ChildNode[1000]; for (int i = 0; i < 1000; i++) { cn[i] = new ChildNode(); cn[i].namakota = ""; cn[i].jarak = -1; } }
public void addchild(string namakotanya,int jaraknya) { for (int i = 0; i < 1000; i++) { if(cn[i].namakota.Equals("")) { cn[i] = new ChildNode(); cn[i].namakota = namakotanya; cn[i].jarak = jaraknya; break; } } }
public void addchild(string namakotanya, int jaraknya) { for (int i = 0; i < 1000; i++) { if (cn[i].namakota.Equals("")) { cn[i] = new ChildNode(); cn[i].namakota = namakotanya; cn[i].jarak = jaraknya; break; } } }