Beispiel #1
0
        public Solver(List <string> input)
        {
            space2D = new Space3D();
            space3D = new Space4D();
            int i = 0;

            for (int x = -input.Count / 2; x <= input.Count / 2 && i < input.Count; x++)
            {
                var line = input[i++];
                int j    = 0;
                for (int y = -line.Length / 2; y <= line.Length / 2 && j < line.Length; y++)
                {
                    if (line[j++] == '#')
                    {
                        space2D.SetActivePart(x, y);
                        space3D.SetActivePart(x, y);
                    }
                }
            }
        }