Lives, Score

This commit is contained in:
Urban Modig
2025-08-21 20:14:18 +02:00
parent 712d58e8e3
commit 9bb76ce682
4 changed files with 39 additions and 5 deletions

View File

@ -50,8 +50,7 @@ public class GhostManager {
ghosts.add(blinky);
ghosts.add(new Ghost(ghostCollisionChecker, new PinkyStrategy(),new ScatterToTopLeft(), image[2]));
ghosts.add(new Ghost(ghostCollisionChecker,new InkyStrategy(blinky), new ScatterToBottomRight(), image[1]));
Ghost clyde = new Ghost(ghostCollisionChecker, new ClydeStrategy(), new ScatterToBottomLeft(), image[3]);
ghosts.add(clyde);
ghosts.add(new Ghost(ghostCollisionChecker, new ClydeStrategy(), new ScatterToBottomLeft(), image[3]));
setMode(GhostMode.CHASE);
}
@ -68,7 +67,7 @@ public class GhostManager {
public void setMode(GhostMode mode) {
this.globalMode = mode;
log.debug("Mode changed to {}", globalMode);
log.info("Mode changed to {}", globalMode);
for (Ghost g : ghosts) {
g.setMode(mode);
}