adventofcode/2021/13/part2.mjs

12 lines
258 B
JavaScript
Raw Normal View History

2021-12-13 16:03:09 +00:00
import fs from "fs-extra";
import fp from "lodash/fp.js";
import _ from "lodash";
2021-12-13 16:03:28 +00:00
import * as p1 from "./part1.mjs";
2021-12-13 16:03:09 +00:00
2021-12-13 16:03:28 +00:00
export function solution({ grid, instructions }) {
instructions.forEach((i) => p1.foldGrid(grid, ...i));
2021-12-13 16:03:09 +00:00
2021-12-13 16:03:28 +00:00
return p1.printGrid(grid);
2021-12-13 16:03:09 +00:00
}