#pragma once #include "Direction.hpp" #include "Position.hpp" #include "PacManAnimation.hpp" #include #include class Board; class InputState; class PacMan { public: explicit PacMan(const Board & board); [[nodiscard]] SDL_Rect currentSprite() const; [[nodiscard]] Position position() const; void update(std::chrono::milliseconds time_delta, InputState state, const Board & board); private: Direction direction = Direction::NONE; Direction desired_direction = Direction::NONE; Position pos; PacManAnimation pacManAnimation; void setDirection(const InputState & state); void updateAnimationPosition(std::chrono::milliseconds time_delta); void updateMazePosition(std::chrono::milliseconds time_delta, const Board & board); };