no more repetitions in hat minesweeper

This commit is contained in:
Zeno Rogue 2023-03-23 02:04:39 +01:00
parent 9c0ff85a98
commit bf6220913c
1 changed files with 5 additions and 0 deletions

View File

@ -1493,6 +1493,11 @@ EX vector<cell*> adj_minefield_cells(cell *c) {
vector<cell*> res;
auto ori = adj_minefield_cells_full(c);
for(auto p: ori) res.push_back(p.c);
if(hat::in()) {
// reduce repetitions
sort(res.begin(), res.end());
res.erase(std::unique(res.begin(), res.end()), res.end());
}
return res;
}