diff --git a/bin/net/grosinger/nomads/DroneListItem.class b/bin/net/grosinger/nomads/DroneListItem.class index f189d1e..1af12f3 100644 Binary files a/bin/net/grosinger/nomads/DroneListItem.class and b/bin/net/grosinger/nomads/DroneListItem.class differ diff --git a/bin/net/grosinger/nomads/Nomads.class b/bin/net/grosinger/nomads/Nomads.class index 200d79b..e034732 100644 Binary files a/bin/net/grosinger/nomads/Nomads.class and b/bin/net/grosinger/nomads/Nomads.class differ diff --git a/bin/net/grosinger/nomads/Police.class b/bin/net/grosinger/nomads/Police.class index cae0ff2..ea42e19 100644 Binary files a/bin/net/grosinger/nomads/Police.class and b/bin/net/grosinger/nomads/Police.class differ diff --git a/bin/net/grosinger/nomads/Upgrade.class b/bin/net/grosinger/nomads/Upgrade.class index 76bcea6..ad70fe0 100644 Binary files a/bin/net/grosinger/nomads/Upgrade.class and b/bin/net/grosinger/nomads/Upgrade.class differ diff --git a/src/net/grosinger/nomads/DroneListItem.java b/src/net/grosinger/nomads/DroneListItem.java index 2589329..882ad7e 100644 --- a/src/net/grosinger/nomads/DroneListItem.java +++ b/src/net/grosinger/nomads/DroneListItem.java @@ -60,8 +60,15 @@ public class DroneListItem { next = theNext; previous = thePrevious; current = theCurrent; - visibleDistance = 15; - speed = 1; + visibleDistance = Nomads.BASE_VISIBLEDISTANCE; + lumaLocatorDistance = Nomads.BASE_LUMALOCATORDISTANCE; + objectLocatorDistance = Nomads.BASE_OBJECTLOCATORDISTANCE; + reliability = Nomads.BASE_RELIABILITY; + attack = Nomads.BASE_ATTACK; + defenses = Nomads.BASE_DEFENSES; + speed = Nomads.BASE_SPEED; + cargoSpace = Nomads.BASE_CARGOSPACE; + theft = Nomads.BASE_THEFT; team = theTeam; waiting = 0; inventory = new ArrayList(); @@ -486,6 +493,7 @@ public class DroneListItem { private void doUpgrade() { Upgrade newUpgrade = current.upgrade(); int price = newUpgrade.getPrice(); + //TODO - Hand price of upgrade being null if (team.getBalance() >= price) { // TODO - Implement purchasing upgrades diff --git a/src/net/grosinger/nomads/Nomads.java b/src/net/grosinger/nomads/Nomads.java index 8359eeb..aa32786 100644 --- a/src/net/grosinger/nomads/Nomads.java +++ b/src/net/grosinger/nomads/Nomads.java @@ -46,6 +46,16 @@ public class Nomads { public static final int MAXOBJECTIVEBOUNTY = 30; public static final int MINOBJECTIVEBOUNTY = 10; + + public static final int BASE_VISIBLEDISTANCE = 15; + public static final int BASE_LUMALOCATORDISTANCE = 10; + public static final int BASE_OBJECTLOCATORDISTANCE = 10; + public static final int BASE_RELIABILITY = 1; + public static final int BASE_ATTACK = 1; + public static final int BASE_DEFENSES = 1; + public static final int BASE_SPEED = 1; + public static final int BASE_CARGOSPACE = 3; + public static final int BASE_THEFT = 1; public static void main(String[] args) { if (DEBUGSTATUS) diff --git a/src/net/grosinger/nomads/Police.java b/src/net/grosinger/nomads/Police.java index 9394eff..b72ed73 100644 --- a/src/net/grosinger/nomads/Police.java +++ b/src/net/grosinger/nomads/Police.java @@ -1,9 +1,73 @@ package net.grosinger.nomads; +import net.grosinger.nomads.DroneListItem.EnumMove; + /** * Enforcer of the law. Has the ability to arrest drones that are wanted. + * Police have a move speed of 2 squares/turn and get faster each time they catch a criminal. + * Captured money and objects are turned into money which funds the police department. + * + * Police have a visible distance of 2X BASE_VISIBLEDISTANCE * */ -public class Police { - //TODO - Implement Police +public class Police implements Drone{ + // TODO - Implement Police + + private static final boolean DEBUGGINGALL = true; + + //Do not change these + private String name; + private String UID; + + // Define any variables that you need + private DroneTools tools; + + // Leave these methods alone, they are required // + + @Override + public String getName() { + return name; + } + + @Override + public void setName(String newName) { + name = newName; + } + + @Override + public void setUID(String newUID) { + UID = newUID; + } + + @Override + public String getUID() { + return UID; + } + + @Override + public void setDroneTools(DroneTools newTools) { + tools = newTools; + } + + // Edit from here down // + + @Override + public EnumMove move() { + return null; + } + + @Override + public Neighbor steal() { + return null; + } + + @Override + public Neighbor attack() { + return null; + } + + @Override + public Upgrade upgrade() { + return null; + } } diff --git a/src/net/grosinger/nomads/Upgrade.java b/src/net/grosinger/nomads/Upgrade.java index 4ab4199..28ea0cc 100644 --- a/src/net/grosinger/nomads/Upgrade.java +++ b/src/net/grosinger/nomads/Upgrade.java @@ -1,14 +1,55 @@ package net.grosinger.nomads; public class Upgrade { - + public enum UpgradeType { visibleDistance, lumaLocatorDistance, objectLocatorDistance, reliability, attack, defenses, speed, cargoSpace, theft } - + private UpgradeType typeToUpgrade; - - public Upgrade(UpgradeType type){ + + public Upgrade(UpgradeType type) { typeToUpgrade = type; } + + /** + * Provides the prices for a given update type + * Algorithm: (((Current Level - Original Level) + 5) * Multiplier)^2 + * + * @return int + */ + public int getPrice() { + switch (typeToUpgrade) { + case visibleDistance: { + + } + case lumaLocatorDistance: { + + } + case objectLocatorDistance: { + + } + case reliability: { + + } + case attack: { + + } + case defenses: { + + } + case speed: { + + } + case cargoSpace: { + + } + case theft: { + + } + default: { + return (Integer) null; + } + } + } }