Exemplo n.º 1
0
        public static Grid_Part2 Parse(string[] input)
        {
            var grid = new Grid_Part2 {
                States = { [0] = new Dictionary <int, Dictionary <int, List <Cube> > >() }
            };

            grid.States[0][0] = new Dictionary <int, List <Cube> >();
            for (var i = 0; i < input.Length; i++)
            {
                grid.States[0][0][i] = input[i]
                                       .Select(c => new Cube(c))
                                       .ToList();
            }


            return(grid);
        }
Exemplo n.º 2
0
 public long Part2(string[] input)
 {
     return(Grid_Part2.Parse(input).RunCycle(6));
 }