diff --git a/core/src/com/me/pacman/entity/Direction.java b/core/src/com/me/pacman/entity/Direction.java new file mode 100644 index 0000000..840294c --- /dev/null +++ b/core/src/com/me/pacman/entity/Direction.java @@ -0,0 +1,8 @@ +package com.me.pacman.entity; + +public enum Direction { + NORTH, + EAST, + SOUTH, + WEST +} diff --git a/core/src/com/me/pacman/entity/MovableEntity.java b/core/src/com/me/pacman/entity/MovableEntity.java index 6afae6f..383f6c7 100644 --- a/core/src/com/me/pacman/entity/MovableEntity.java +++ b/core/src/com/me/pacman/entity/MovableEntity.java @@ -148,11 +148,4 @@ public abstract class MovableEntity extends Entity { } } - public enum Direction { - NORTH, - EAST, - SOUTH, - WEST - } - } diff --git a/core/src/com/me/pacman/state/PlayState.java b/core/src/com/me/pacman/state/PlayState.java index 3d3217e..a04832e 100644 --- a/core/src/com/me/pacman/state/PlayState.java +++ b/core/src/com/me/pacman/state/PlayState.java @@ -8,7 +8,7 @@ import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.me.pacman.PacDude; -import com.me.pacman.entity.MovableEntity; +import com.me.pacman.entity.Direction; import com.me.pacman.entity.Pacman; import com.me.pacman.level.Level; import com.me.pacman.level.LevelTile; @@ -157,16 +157,16 @@ public class PlayState extends LevelState { public boolean keyDown(int keycode) { switch (keycode) { case Input.Keys.UP: - pacman.setNextDirection(MovableEntity.Direction.NORTH); + pacman.setNextDirection(Direction.NORTH); break; case Input.Keys.DOWN: - pacman.setNextDirection(MovableEntity.Direction.SOUTH); + pacman.setNextDirection(Direction.SOUTH); break; case Input.Keys.LEFT: - pacman.setNextDirection(MovableEntity.Direction.WEST); + pacman.setNextDirection(Direction.WEST); break; case Input.Keys.RIGHT: - pacman.setNextDirection(MovableEntity.Direction.EAST); + pacman.setNextDirection(Direction.EAST); break; case Input.Keys.P: paused = !paused;