This commit is contained in:
Eric Mertens 2022-11-04 11:37:32 -07:00
parent 8d65f74d9f
commit 8c6d8d4a29
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ using Coord = std::pair<ValueType, ValueType>;
auto Compute(Machine machine, ValueType start)
-> std::map<Coord, ValueType> {
Coord here {0,0};
std::map<Coord, ValueType> paint {{here,start}};
ValueType dx {0};

View File

@ -21,7 +21,7 @@ auto Compute(Machine machine) -> std::pair<int,int> {
std::vector<State> layer {{{0,0}, std::move(machine)}};
std::vector<State> next_layer;
auto action = [&](Machine m, ValueType cmd, Coord coord) {
if (!world.contains(coord)) {
std::get<Input>(Step(m)).pos = cmd;
@ -56,7 +56,7 @@ auto Compute(Machine machine) -> std::pair<int,int> {
part1++;
}
loop2:
int part2 = 0;
while (!layer.empty()) {