Browse Source

refactoring: interface changed

remotes/origin/ghostsbehaviour
fdai2751 11 months ago
parent
commit
531a97a1d2
  1. 2
      src/main/java/pacmanGame/GhostBehavior.java
  2. 8
      src/main/java/pacmanGame/GhostBehaviorChase.java

2
src/main/java/pacmanGame/GhostBehavior.java

@ -1,7 +1,7 @@
package pacmanGame;
public interface GhostBehavior {
public Vector2 GetDirection();
public Vector2 GetDirection(Ghost ghost);
}

8
src/main/java/pacmanGame/GhostBehaviorChase.java

@ -1,14 +1,10 @@
package pacmanGame;
public class GhostBehaviorChase implements GhostBehavior {
public final Ghost ghost;
public GhostBehaviorChase(Ghost ghost) {
this.ghost = ghost;
}
@Override
public Vector2 GetDirection() {
public Vector2 GetDirection(Ghost ghost) {
return null;
}

Loading…
Cancel
Save