/// <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(); }
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; } } }
/// <summary> /// Конструктор класса /// </summary> /// <param name="inputData"></param> public Network(ReadOut inputData) { ArrayOfComputers = inputData.ArrayOfComputer; Graph = inputData.Graph; randomizer = new Random(); }
public void IncorrectInputDataException() { ReadOut input = new ReadOut("..\\..\\testForIncorrectData.txt"); }
public void ConstructReadOutTest() { ReadOut input = new ReadOut("wrong"); }
public void Initialize() { ReadOut input = new ReadOut("..\\..\\test.txt"); network = new Network.Network(input, 38); }
public void ConstructReadOutTest() { ReadOut input = new ReadOut("ololo"); }