pacman/lib/SuperPellets.hpp
Corentin Jabot bbf3731cf4 Change window geometry for scoring.
* Add margins all around the board for better aestetics.
* Add room for scoring
* Because the texture atlas is a 32x32 grid, we can manipulate
textures as positions on that grid and only create a rectangle
for that texture in the rendering code.
* Avoid hardcoded values in the rendering code.
2021-06-15 23:55:55 +02:00

23 lines
416 B
C++

#pragma once
#include "Position.hpp"
#include "Board.hpp"
#include <SDL2/SDL_rect.h>
class SuperPellets {
public:
explicit SuperPellets(const Board & board);
[[nodiscard]] SDL_Point currentSprite() const {
return sprite;
}
[[nodiscard]] std::vector<SDL_Point> currentPositions() const {
return positions;
}
private:
const SDL_Point sprite = { 0, 9 };
std::vector<SDL_Point> positions;
};