static void Puzzle2(OrigamiGrid grid) { foreach (var item in grid.Instuctions) { if (item.Direction == FoldDirection.X) { grid.FoldX(item.Target); continue; } grid.FoldY(item.Target); } grid.DumpPoints(); }
static long Puzzle1(OrigamiGrid grid) { var direction = grid.Instuctions[0].Direction; var target = grid.Instuctions[0].Target; if (direction == FoldDirection.X) { grid.FoldX(target); } else { grid.FoldY(target); } return(grid.CountPoints()); }