static void Main(string[] args) { // Task 3.1 WeakestLink people = new WeakestLink(7); people.DeleteEvery(2); // people.DeleteEvery(3); // people.DeleteEvery(4); //Task 3.2 TextAnalysis textAnalysis = new TextAnalysis(); textAnalysis.Analyze("Jimmy was a bad man, because he writting ban word on walls"); textAnalysis.Analyze("Jimmy was a jimmy, because he writting jimmy word on jimmy walls"); textAnalysis.Analyze("Jimmy was a jimmy, because jimmy writting jimmy jimmy on jimmy jimmy"); textAnalysis.Analyze("Jimmy jimmy jimmy jimmy, jimmy jimmy jimmy jimmy jimmy jimmy jimmy jimmy"); textAnalysis.Analyze("Jimmy jimmy jimmy jimmy, danny danny danny danny, manny manny manny manny"); textAnalysis.Analyze("Jimmy jimmy jimmy jimmy jimmy jimmy jimmy jimmy jimmy jimmy jimmy, manny"); textAnalysis.Analyze("Jimmy danny manny"); }
public static void StartGame() { // Оставил, если будет интересно посмотреть с обычными именами, а не guid //List<Human> humans = new List<Human> //{ // new Human{Name = "Tasker"}, // new Human{Name = "Person2"}, // new Human{Name = "Markus"}, // new Human{Name = "Polo"}, // new Human{Name = "Just"}, // new Human{Name = "Testy"}, // new Human{Name = "Some"} //}; //CircleList<Human> cList = new CircleList<Human>(humans.Select(human => (Human)human.Clone())); PrintMessage("Введите N"); PrintMessage(messageType: InputOutput.Input); int peopleCount = 0; if (!int.TryParse(Console.ReadLine(), out peopleCount)) { throw new Exception("Неверно введено число!"); } CircleList <Human> cList = new CircleList <Human>(HumanGenerator.GenerateHumans(peopleCount)); PrintMessage("Введите, какой по счёту человек будет вычеркнут каждый раунд:"); PrintMessage(messageType: InputOutput.Input); int indexDeleter = 0; if (!int.TryParse(Console.ReadLine(), out indexDeleter)) { throw new Exception("Неверно введено число!"); } WeakestLink <Human> weakLink = new WeakestLink <Human>(indexDeleter, cList); weakLink.StartWeakestLink(); }