コード例 #1
0
        public void Run()
        {
            var input = _fileReader.ReadFile(_configuration.InputPath);

            var output = _service.Evolve(input);

            var lines = _converter.Convert(output);

            foreach (var line in lines)
            {
                Console.WriteLine(line);
            }
        }
コード例 #2
0
        public void Test_Evolve()
        {
            var testInput = new bool[][]
            {
                new bool[] { false, false, false, false, false },
                new bool[] { false, false, true, false, false },
                new bool[] { false, true, true, true, false },
                new bool[] { false, false, true, false, false },
                new bool[] { false, false, false, false, false }
            };

            var result = _service.Evolve(testInput);

            var expected = new bool[][]
            {
                new bool[] { false, false, false, false, false },
                new bool[] { false, true, true, true, false },
                new bool[] { false, true, false, true, false },
                new bool[] { false, true, true, true, false },
                new bool[] { false, false, false, false, false }
            };

            Assert.AreEqual(expected, result);
        }