13 lines
269 B
C++
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
|