mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-25 23:40:09 +00:00
no more repetitions in hat minesweeper
This commit is contained in:
parent
9c0ff85a98
commit
bf6220913c
5
cell.cpp
5
cell.cpp
@ -1493,6 +1493,11 @@ EX vector<cell*> adj_minefield_cells(cell *c) {
|
|||||||
vector<cell*> res;
|
vector<cell*> res;
|
||||||
auto ori = adj_minefield_cells_full(c);
|
auto ori = adj_minefield_cells_full(c);
|
||||||
for(auto p: ori) res.push_back(p.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;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user