Don't use ->
This commit is contained in:
parent
a7a1565c99
commit
f7b53d9fca
2 changed files with 3 additions and 2 deletions
|
@ -117,7 +117,7 @@ void Game::eatPellets() {
|
|||
void Game::processEvents(InputState & inputState) {
|
||||
|
||||
auto event = canvas.pollEvent();
|
||||
if (event && event->type == sf::Event::Closed) {
|
||||
if (event && event.value().type == sf::Event::Closed) {
|
||||
inputState.close = true;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -156,8 +156,9 @@ void Ghost::updateDirection(const Board & board) {
|
|||
return a.distance < b.distance;
|
||||
});
|
||||
|
||||
auto move = *optimal_move;
|
||||
direction = move.direction;
|
||||
last_grid_position = current_grid_position;
|
||||
direction = optimal_move->direction;
|
||||
}
|
||||
|
||||
Position Ghost::target(const Board & board) const {
|
||||
|
|
Loading…
Reference in a new issue