Пример #1
0
        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 + "->" );
        }
Пример #2
0
        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 + "->" );
        }
Пример #3
0
 public void linkCostar(ActorGraphNode costar)
 {
     linkedActors.Add(costar);
     costar.linkedActors.Add(this);
 }
Пример #4
0
 public void linkCostar(ActorGraphNode costar)
 {
     linkedActors.Add (costar);
     costar.linkedActors.Add (this);
 }