예제 #1
0
 /// <summary>
 /// Конструктор класса с рандомайзером
 /// </summary>
 /// <param name="inputData"></param>
 /// <param name="numberForRandom"></param>
 public Network(ReadOut inputData, int numberForRandom)
 {
     ArrayOfComputers = inputData.ArrayOfComputer;
     Graph = inputData.Graph;
     randomizer = new Random(numberForRandom);
     forTravers = Graph.CreateBFSQueue();
 }
예제 #2
0
 static void Main(string[] args)
 {
     ReadOut input = new ReadOut("..\\..\\inform.txt");
     Network network = new Network(input, 38);
     while (true)
     {
         var key = Console.ReadKey(true);
         switch (key.Key)
         {
             case ConsoleKey.Enter:
                 Console.Clear();
                 Console.WriteLine(network.GetInformation());
                 network.OneTact();
                 break;
         }
     }
 }
예제 #3
0
 /// <summary>
 /// Конструктор класса
 /// </summary>
 /// <param name="inputData"></param>
 public Network(ReadOut inputData)
 {
     ArrayOfComputers = inputData.ArrayOfComputer;
     Graph = inputData.Graph;
     randomizer = new Random();
 }
예제 #4
0
 public void IncorrectInputDataException()
 {
     ReadOut input = new ReadOut("..\\..\\testForIncorrectData.txt");
 }
예제 #5
0
 public void ConstructReadOutTest()
 {
     ReadOut input = new ReadOut("wrong");
 }
예제 #6
0
 public void Initialize()
 {
     ReadOut input = new ReadOut("..\\..\\test.txt");
     network = new Network.Network(input, 38);
 }
예제 #7
0
 public void ConstructReadOutTest()
 {
     ReadOut input = new ReadOut("ololo");
 }