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

13 lines
269 B
C++

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