Browse Source

refactoring: outsourced the entities in the entities package

remotes/origin/locations
David Hermann 2 years ago
parent
commit
a3722db633
  1. 4
      src/main/java/org/bitbiome/classes/CreateLocations.java
  2. 10
      src/main/java/org/bitbiome/classes/TravelEngine.java
  3. 2
      src/main/java/org/bitbiome/entities/Item.java
  4. 2
      src/main/java/org/bitbiome/entities/Location.java
  5. 2
      src/main/java/org/bitbiome/entities/Mob.java
  6. 4
      src/main/java/org/bitbiome/entities/Player.java

4
src/main/java/org/bitbiome/classes/CreateLocations.java

@ -1,5 +1,9 @@
package org.bitbiome.classes;
import org.bitbiome.entities.Item;
import org.bitbiome.entities.Location;
import org.bitbiome.entities.Mob;
import java.util.ArrayList;
public class CreateLocations {

10
src/main/java/org/bitbiome/classes/TravelEngine.java

@ -1,15 +1,19 @@
package org.bitbiome.classes;
import org.bitbiome.entities.Location;
import org.bitbiome.entities.Player;
public class TravelEngine {
private Location location;
private Player player;
public TravelEngine() {
public TravelEngine(Player player) {
this.player = player;
}
public void travelTo(Location location) {
this.location = location;
player.setLocation(location);
}
}

2
src/main/java/org/bitbiome/classes/Item.java → src/main/java/org/bitbiome/entities/Item.java

@ -1,4 +1,4 @@
package org.bitbiome.classes;
package org.bitbiome.entities;
public class Item {

2
src/main/java/org/bitbiome/classes/Location.java → src/main/java/org/bitbiome/entities/Location.java

@ -1,4 +1,4 @@
package org.bitbiome.classes;
package org.bitbiome.entities;
import java.util.ArrayList;

2
src/main/java/org/bitbiome/classes/Mob.java → src/main/java/org/bitbiome/entities/Mob.java

@ -1,4 +1,4 @@
package org.bitbiome.classes;
package org.bitbiome.entities;
public class Mob {

4
src/main/java/org/bitbiome/classes/Player.java → src/main/java/org/bitbiome/entities/Player.java

@ -1,4 +1,6 @@
package org.bitbiome.classes;
package org.bitbiome.entities;
import org.bitbiome.classes.CreateLocations;
import java.util.ArrayList;
Loading…
Cancel
Save