2020-11-28 13:10:25 +00:00
|
|
|
#include "SuperPellets.hpp"
|
2021-06-16 13:31:42 +00:00
|
|
|
#include <algorithm>
|
2020-11-28 13:10:25 +00:00
|
|
|
|
2021-07-05 12:10:01 +00:00
|
|
|
namespace pacman {
|
|
|
|
|
2021-07-07 09:39:09 +00:00
|
|
|
SuperPellets::SuperPellets()
|
2021-07-08 15:42:24 +00:00
|
|
|
: positions(initialSuperPelletPositions()) {}
|
2021-06-16 11:59:16 +00:00
|
|
|
|
2021-07-05 11:54:54 +00:00
|
|
|
bool SuperPellets::eatPelletAtPosition(GridPosition p) {
|
2021-09-08 08:21:37 +00:00
|
|
|
return std::erase(positions, p) > 0;
|
2021-06-16 11:59:16 +00:00
|
|
|
}
|
2021-07-05 12:10:01 +00:00
|
|
|
|
|
|
|
} // namespace pacman
|