pacman/lib/include/Board.hpp

33 lines
845 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 "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-08-02 13:31:32 +00:00
bool isWalkableForPacMan(GridPosition point);
bool isWalkableForGhost(GridPosition point, GridPosition origin, bool isEyes);
bool isInPen(GridPosition point);
bool isPortal(GridPosition point, Direction direction);
GridPosition iterateGridPosition(GridPosition point, Direction direction);
2021-08-02 13:31:32 +00:00
GridPosition teleport(GridPosition point);
2020-11-27 13:10:09 +00:00
2021-08-02 13:31:32 +00:00
std::vector<GridPosition> initialPelletPositions();
2021-06-24 11:32:52 +00:00
2021-08-02 13:31:32 +00:00
std::vector<GridPosition> initialSuperPelletPositions();
2020-11-27 13:10:09 +00:00
inline Position penDoorPosition() {
return { 13, 11 };
}
inline Position initialPacManPosition() {
return { 13.5, 23 };
}
bool isWalkableStraightLine(GridPosition pointA, GridPosition pointB);
bool isIntersection(GridPosition point);
} // namespace pacman