pacman/lib/Pellets.cpp
2021-09-08 10:21:37 +02:00

13 lines
244 B
C++

#include "Pellets.hpp"
#include <algorithm>
namespace pacman {
Pellets::Pellets()
: positions(initialPelletPositions()) {}
bool Pellets::eatPelletAtPosition(GridPosition p) {
return std::erase(positions, p) > 0;
}
} // namespace pacman