pacman/lib/include/Board.hpp

27 lines
801 B
C++
Raw Normal View History

2021-06-10 12:42:51 +00:00
#pragma once
2020-11-27 13:10:09 +00:00
#include <SFML/Graphics.hpp>
#include "Direction.hpp"
#include "Position.hpp"
2021-07-01 12:33:59 +00:00
#include <array>
2020-11-27 13:10:09 +00:00
#include <cstdint>
#include <vector>
2021-07-05 12:10:01 +00:00
namespace pacman {
2021-07-08 15:42:24 +00:00
[[nodiscard]] bool isWalkableForPacMan(GridPosition point);
[[nodiscard]] bool isWalkableForGhost(GridPosition point, GridPosition origin, bool isEyes);
[[nodiscard]] bool isInPen(GridPosition point);
2021-07-08 16:00:39 +00:00
[[nodiscard]] bool isPortal(GridPosition point, Direction direction);
[[nodiscard]] GridPosition teleport(GridPosition point);
2020-11-27 13:10:09 +00:00
2021-07-08 15:42:24 +00:00
[[nodiscard]] std::vector<GridPosition> initialPelletPositions();
2021-06-24 11:32:52 +00:00
2021-07-08 15:42:24 +00:00
[[nodiscard]] std::vector<GridPosition> initialSuperPelletPositions();
2020-11-27 13:10:09 +00:00
2021-07-08 15:42:24 +00:00
inline Position penDoorPosition() { return { 13, 11 }; }
inline Position initialPacManPosition() { return { 13.5, 23 }; }
} // namespace pacman