pacman/lib/include/Pellets.hpp

28 lines
479 B
C++
Raw Normal View History

2021-06-10 12:42:51 +00:00
#pragma once
#include "Board.hpp"
#include "Position.hpp"
2021-07-05 12:10:01 +00:00
namespace pacman {
class Pellets {
public:
explicit Pellets(const Board & board);
2021-07-05 09:46:49 +00:00
[[nodiscard]] GridPosition currentSprite() const {
2020-11-28 13:58:15 +00:00
return sprite;
};
2021-07-05 09:46:49 +00:00
[[nodiscard]] std::vector<GridPosition> currentPositions() const {
return positions;
}
2021-07-05 11:54:54 +00:00
bool eatPelletAtPosition(GridPosition p);
2021-06-16 11:59:16 +00:00
private:
2021-07-05 09:46:49 +00:00
const GridPosition sprite = { 1, 9 };
std::vector<GridPosition> positions;
};
2021-07-05 12:10:01 +00:00
} // namespace pacman