WORK IN PROGRESS
TODO: implement random level generation moved exclude from list to position.h distinguished level and map
This commit is contained in:
@ -110,24 +110,6 @@ result character::apply(direction &dir, const potion_list &potions) {
|
||||
return result::fine;
|
||||
}
|
||||
|
||||
position_list remove_from_list(const position_list &sorted_positions,
|
||||
position_list excluded) {
|
||||
std::sort(excluded.begin(), excluded.end());
|
||||
|
||||
position_list result{sorted_positions.size() - excluded.size()};
|
||||
|
||||
auto exc = excluded.begin();
|
||||
|
||||
for (auto src : sorted_positions) {
|
||||
if (exc != excluded.end() && src == *exc)
|
||||
++exc;
|
||||
else
|
||||
result.push_back(src);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// IMPORTANT: remember to check if player is on the stairs
|
||||
result character::move(const direction dir,
|
||||
const position_list &available_positions) {
|
||||
|
Reference in New Issue
Block a user