TODO: modify other races constructors

did some reworking
This commit is contained in:
2024-07-13 14:02:30 -04:00
parent f2d2f6f72d
commit 9fdbf141d3
24 changed files with 227 additions and 186 deletions

View File

@ -65,16 +65,12 @@ std::vector<position> remove_from_list(const std::vector<position>
return result;
}
std::vector<position> remove_from_list(const std::vector<position>
&sorted_positions,
position &excluded) {
std::vector<position> result{sorted_positions.size() - 1};
for (auto src : sorted_positions) {
if (src != excluded)
result.push_back(src);
}
return result;
void remove_from_list(std::vector<position>
&positions,
position &excluded) {
for (auto i = positions.begin(); i != positions.end(); ++i)
if (*i == excluded) {
positions.erase(i);
return;
}
}