Skip to content

Commit 6db79dc

Browse files
committed
Remove debug helpers from day 15
1 parent 5910223 commit 6db79dc

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

day15/src/day15.cpp

-37
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,8 @@ struct Vec2 {
1515
Vec2<T> operator+(const Vec2<T> &rhs) const {
1616
return {x + rhs.x, y + rhs.y};
1717
}
18-
19-
Vec2<T> operator-(const Vec2<T> &rhs) const {
20-
return {x - rhs.x, y - rhs.y};
21-
}
22-
23-
void operator+=(const Vec2<T> &rhs) {
24-
x += rhs.x;
25-
y += rhs.y;
26-
}
27-
28-
void operator-=(const Vec2<T> &rhs) {
29-
x -= rhs.x;
30-
y -= rhs.y;
31-
}
3218
};
3319

34-
template <typename T>
35-
std::ostream &operator<<(std::ostream &os, Vec2<T> vec) {
36-
return os << vec.x << ", " << vec.y;
37-
}
38-
3920
template <typename T>
4021
struct std::hash<Vec2<T>> {
4122
std::size_t operator()(const Vec2<T> &vec) const {
@@ -59,10 +40,6 @@ Vec2<int> inst_dir(Inst inst) {
5940
}
6041
}
6142

62-
std::ostream &operator<<(std::ostream &os, Inst inst) {
63-
return os << char(inst);
64-
}
65-
6643
struct Board {
6744
std::vector<std::string> rows;
6845
Vec2<int> robot = {-1, -1};
@@ -165,20 +142,6 @@ struct Board {
165142
}
166143
};
167144

168-
std::ostream &operator<<(std::ostream &os, const Board &board) {
169-
for (int y = 0; y < board.height(); y++) {
170-
for (int x = 0; x < board.width(); x++) {
171-
if (board.robot == Vec2<int>({x, y})) {
172-
os << '@';
173-
} else {
174-
os << board[{x, y}];
175-
}
176-
}
177-
os << std::endl;
178-
}
179-
return os;
180-
}
181-
182145
struct State {
183146
Board board1;
184147
Board board2;

0 commit comments

Comments
 (0)