Fixing minor issues
This commit is contained in:
@ -57,7 +57,7 @@ public class CollisionChecker {
|
||||
int x = pos.x;
|
||||
int y = pos.y;
|
||||
int width = GamePanel.SCREEN_WIDTH;
|
||||
int height = map.getHeight();
|
||||
int height = GamePanel.SCREEN_HEIGHT;
|
||||
|
||||
// tunnel
|
||||
if (x < GameMap.OFFSET_X) x = width - agent_width/2 - GameMap.OFFSET_X; // right
|
||||
|
||||
@ -15,7 +15,7 @@ public class ClydeStrategy implements GhostStrategy {
|
||||
if (distance > 8) {
|
||||
return pacTile; // chase Pac-Man
|
||||
} else {
|
||||
return new Point(0, map.getHeight() - 1); // retreat to corner
|
||||
return new Point(0, GameMap.OFFSET_Y + (map.rows() * GameMap.MAP_TILESIZE)); // retreat to corner
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,4 +200,5 @@ public class GameMap {
|
||||
public int rows() {
|
||||
return mapData.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user