public void FindSuspects()
        {
            Random random        = new Random();
            string suspectedName = random.Next(_hypothesesService.GetSuspects().Length).ToString();

            suspectedName = VerifySetHyphoteseInArrayWhenValueIsZero(suspectedName);
            auxListSolvedCase.Add(suspectedName);
            SolvedCase = auxListSolvedCase.ToArray();
        }
示例#2
0
        public void ListSuspects()
        {
            int countItems = 1;

            var suspects  = _hypothesesService.GetSuspects();
            var locations = _hypothesesService.GetLocations();
            var weapons   = _hypothesesService.GetWeapons();

            Console.WriteLine("These are the suspects of crime:");
            for (int i = 0; i < suspects.Length; i++)
            {
                Console.WriteLine("{0}. {1}", countItems++, suspects[i]);
            }

            Console.WriteLine();
            countItems = 1;
            Console.WriteLine("These are the possible locations of crime:");
            for (int i = 0; i < locations.Length; i++)
            {
                Console.WriteLine("{0}. {1}", countItems++, locations[i]);
            }

            Console.WriteLine();
            countItems = 1;
            Console.WriteLine("These are the possible weapons of crime:");
            for (int i = 0; i < weapons.Length; i++)
            {
                Console.WriteLine("{0}. {1}", countItems++, weapons[i]);
            }
        }