public static void Main(string[] args) { ActorGraphNode Kevin = new ActorGraphNode("Kevin"); ActorGraphNode Rock = new ActorGraphNode("Rock"); ActorGraphNode A = new ActorGraphNode("A"); ActorGraphNode B = new ActorGraphNode("B"); ActorGraphNode C = new ActorGraphNode("C"); Kevin.linkCostar(Rock); Rock.linkCostar(A); B.linkCostar(C); Kevin.setBaconNumber(); Console.WriteLine("A's Bacon Number is " + A.getBaconNumber()); //Console.WriteLine (Kevin.name + "->" ); }
public static void Main(string[] args) { ActorGraphNode Kevin = new ActorGraphNode ("Kevin"); ActorGraphNode Rock = new ActorGraphNode ("Rock"); ActorGraphNode A = new ActorGraphNode ("A"); ActorGraphNode B = new ActorGraphNode ("B"); ActorGraphNode C = new ActorGraphNode ("C"); Kevin.linkCostar(Rock); Rock.linkCostar (A); B.linkCostar (C); Kevin.setBaconNumber (); Console.WriteLine ("A's Bacon Number is "+A.getBaconNumber ()); //Console.WriteLine (Kevin.name + "->" ); }
public void linkCostar(ActorGraphNode costar) { linkedActors.Add(costar); costar.linkedActors.Add(this); }
public void linkCostar(ActorGraphNode costar) { linkedActors.Add (costar); costar.linkedActors.Add (this); }