white
This commit is contained in:
parent
8d65f74d9f
commit
8c6d8d4a29
|
@ -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};
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user