Remove pacman::
This commit is contained in:
parent
71cb40ad18
commit
79b78f7dc0
5 changed files with 9 additions and 9 deletions
|
@ -3,7 +3,7 @@
|
|||
namespace pacman {
|
||||
|
||||
Blinky::Blinky()
|
||||
: Ghost(Atlas::Ghost::blinky, pacman::initialBlinkyPosition()) {
|
||||
: Ghost(Atlas::Ghost::blinky, initialBlinkyPosition()) {
|
||||
}
|
||||
|
||||
double Blinky::speed(const GameState & gameState) const {
|
||||
|
@ -19,7 +19,7 @@ Position Blinky::target(const GameState & gameState) const {
|
|||
return startingPosition;
|
||||
|
||||
if (isInPen())
|
||||
return pacman::penDoorPosition();
|
||||
return penDoorPosition();
|
||||
|
||||
return blinkyScatterTarget();
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ void Ghost::updateDirection(const GameState & gameState) {
|
|||
continue;
|
||||
|
||||
const GridPosition grid_position = { size_t(move.position.x), size_t(move.position.y) };
|
||||
const bool can_walk = pacman::isWalkableForGhost(grid_position, current_grid_position, isEyes());
|
||||
const bool can_walk = isWalkableForGhost(grid_position, current_grid_position, isEyes());
|
||||
if (!can_walk)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace pacman {
|
||||
|
||||
Inky::Inky()
|
||||
: Ghost(Atlas::Ghost::inky, pacman::initialInkyPosition()) {
|
||||
: Ghost(Atlas::Ghost::inky, initialInkyPosition()) {
|
||||
}
|
||||
|
||||
double Inky::speed(const GameState & gameState) const {
|
||||
|
@ -19,7 +19,7 @@ Position Inky::target(const GameState & gameState) const {
|
|||
return startingPosition;
|
||||
|
||||
if (isInPen())
|
||||
return pacman::penDoorPosition();
|
||||
return penDoorPosition();
|
||||
|
||||
return inkyScatterTarget();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ void PacMan::reset() {
|
|||
dead = false;
|
||||
direction = Direction::NONE;
|
||||
desired_direction = Direction::NONE;
|
||||
pos = pacman::initialPacManPosition();
|
||||
pos = initialPacManPosition();
|
||||
}
|
||||
|
||||
void PacMan::update(std::chrono::milliseconds time_delta, Direction input_direction) {
|
||||
|
@ -76,7 +76,7 @@ void PacMan::updateMazePosition(std::chrono::milliseconds time_delta) {
|
|||
};
|
||||
|
||||
auto canGo = [&](Direction move_direction) {
|
||||
return pacman::isWalkableForPacMan(moveToPosition(pos, move_direction));
|
||||
return isWalkableForPacMan(moveToPosition(pos, move_direction));
|
||||
};
|
||||
|
||||
if (canGo(desired_direction)) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace pacman {
|
||||
|
||||
Pinky::Pinky()
|
||||
: Ghost(Atlas::Ghost::speedy, pacman::initialSpeedyPosition()) {
|
||||
: Ghost(Atlas::Ghost::speedy, initialSpeedyPosition()) {
|
||||
}
|
||||
|
||||
double Pinky::speed(const GameState & gameState) const {
|
||||
|
@ -19,7 +19,7 @@ Position Pinky::target(const GameState & gameState) const {
|
|||
return startingPosition;
|
||||
|
||||
if (isInPen())
|
||||
return pacman::penDoorPosition();
|
||||
return penDoorPosition();
|
||||
|
||||
return speedyScatterTarget();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue