pacman/lib/include/Board.hpp

37 lines
1.2 KiB
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);
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 }; }
2021-07-08 15:42:24 +00:00
inline Position initialBlinkyPosition() { return { 13.5, 11 }; }
inline Position blinkyScatterTarget() { return { 25, -3 }; }
2020-11-27 13:10:09 +00:00
2021-07-08 15:42:24 +00:00
inline Position initialSpeedyPosition() { return { 11.5, 14 }; }
inline Position speedyScatterTarget() { return { 3, -2 }; }
2021-06-24 11:32:52 +00:00
2021-07-08 15:42:24 +00:00
inline Position initialInkyPosition() { return { 13.5, 14 }; }
inline Position inkyScatterTarget() { return { 27, 30 }; }
2021-07-08 15:42:24 +00:00
inline Position initialClydePosition() { return { 15.5, 14 }; }
inline Position clydeScatterTarget() { return { 0, 30 }; }
2021-07-05 12:10:01 +00:00
} // namespace pacman