private static long Solve(string input, int dimensions) { Space space = Space.Build(input, dimensions); for (int i = 0; i < 6; i++) { space = Simulate(space); } return(space.Count()); }