pacman/lib/include/Board.hpp
Dag-Erling Smørgrav b9354e3dd1 Ex 14: add isWall().
2021-10-19 10:50:21 +02:00

30 lines
751 B
C++

#pragma once
#include "Direction.hpp"
#include "Position.hpp"
#include <array>
#include <cstdint>
#include <vector>
namespace pacman {
bool isWall(GridPosition point);
bool isWalkableForPacMan(GridPosition point);
bool isWalkableForGhost(GridPosition target_position, GridPosition current_position, bool isEyes);
bool isInPen(GridPosition point);
bool isPortal(GridPosition point, Direction direction);
bool isIntersection(GridPosition point);
GridPosition teleport(GridPosition point);
std::vector<GridPosition> initialPelletPositions();
std::vector<GridPosition> initialSuperPelletPositions();
inline Position penDoorPosition() {
return { 13, 11 };
}
inline Position initialPacManPosition() {
return { 13.5, 23 };
}
} // namespace pacman