Пример #1
0
 public Intersection OtherNode(Intersection node)
 {
     #if DEBUG
     if(node != this.Node1 && node != this.Node2)
         throw new Exception("Given node is invalid");
     #endif
     return node == this.Node1 ? this.Node2 : this.Node1;
 }
Пример #2
0
        public Street(GameState game, Intersection node1, Intersection node2, Unit width)
            : base(game)
        {
            this.Node1 = node1;
            this.Node2 = node2;
            this.Width = width;

            node1.AddStreet(this);
            node2.AddStreet(this);

            this.listAs<Street>();
        }