allows the idiom: "for (auto npos : neighbors | transform(around(pos)))"
| 203 | // allows the idiom: |
| 204 | // "for (auto npos : neighbors | transform(around(pos)))" |
| 205 | static std::function<coord(offset)> around (coord pos) { |
| 206 | return [pos](offset o){ return pos + o; }; |
| 207 | } |
| 208 | |
| 209 | /* offsets for various neighborhoods |
| 210 | * using constexpr would be preferable, |
no outgoing calls
no test coverage detected