Ejemplo n.º 1
0
 public void AddAllConnections(ConnectivityMap originMap)
 {
     foreach (var connection in originMap.GetAllConnections())
     {
         AddRoomConnection(connection.Source, connection.Target);
     }
 }
Ejemplo n.º 2
0
 public void AddAllConnections(ConnectivityMap originMap)
 {
     foreach (var connection in originMap.GetAllConnections())
     {
         AddRoomConnection(connection.Source, connection.Target);
     }
 }
Ejemplo n.º 3
0
        public void ConnectionCanBeAddedFromAnotherMap()
        {
            ConnectivityMap newMap = new ConnectivityMap();

            newMap.AddRoomConnection(1, 2);
            newMap.AddRoomConnection(2, 3);

            ConnectivityMap newMap2 = new ConnectivityMap();

            newMap2.AddRoomConnection(3, 4);
            newMap2.AddRoomConnection(4, 5);

            newMap.AddAllConnections(newMap2);

            CollectionAssert.AreEquivalent(new List<Connection>(new Connection[] { new Connection(1, 2), new Connection(2, 3),
                new Connection(3, 4), new Connection(4, 5)}), newMap.GetAllConnections().ToList());
        }
Ejemplo n.º 4
0
 private Connection GetRandomEdgeInMap(ConnectivityMap generatedMap)
 {
     return generatedMap.GetAllConnections().RandomElementUsing(random);
 }