From 2004a1a636f95e9a983359433444c37db7e7446d Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Fri, 23 Sep 2011 09:50:41 -0700 Subject: [PATCH] -Supressed warnings about exceptions Signed-off-by: Tony Grosinger --- .../grosinger/nomads/NeighborObjective.class | Bin 1101 -> 1101 bytes .../drones/DroneListItem$Direction.class | Bin 1321 -> 1321 bytes .../drones/DroneListItem$EnumMove.class | Bin 1529 -> 1529 bytes .../nomads/drones/DroneListItem.class | Bin 11917 -> 11917 bytes bin/net/grosinger/nomads/drones/Police.class | Bin 1496 -> 1717 bytes .../exceptions/BadRequestException.class | Bin 413 -> 413 bytes .../exceptions/FullInventoryException.class | Bin 423 -> 423 bytes .../InsufficientFundsException.class | Bin 482 -> 482 bytes .../exceptions/InvalidUpgradeException.class | Bin 424 -> 424 bytes .../ObjectReferenceOutdatedException.class | Bin 489 -> 489 bytes .../grosinger/nomads/NeighborObjective.java | 6 +++--- .../nomads/buildings/PoliceStation.java | 2 +- .../nomads/drones/DroneListItem.java | 2 +- src/net/grosinger/nomads/drones/Police.java | 7 +++++++ .../exceptions/BadRequestException.java | 1 + .../exceptions/FullInventoryException.java | 1 + .../InsufficientFundsException.java | 1 + .../exceptions/InvalidUpgradeException.java | 1 + .../ObjectReferenceOutdatedException.java | 1 + 19 files changed, 17 insertions(+), 5 deletions(-) diff --git a/bin/net/grosinger/nomads/NeighborObjective.class b/bin/net/grosinger/nomads/NeighborObjective.class index 0211a670937e4f9433d9f33b7053799c703efea6..7deb40b5fcdcffea58a6cfcec49e0c4a50027de8 100644 GIT binary patch delta 30 hcmX@hah794E|VY=11AF)0|NsS12=@;T*q{t5dc_B1q=WH delta 30 ecmX@hah794E|VYw11AF)0|;+EE@nuXa(5- diff --git a/bin/net/grosinger/nomads/drones/DroneListItem$EnumMove.class b/bin/net/grosinger/nomads/drones/DroneListItem$EnumMove.class index a8ee0cea2ed05d6a37cd53f10eb73fc9ce49d8bd..ff8d56c0e335faa237096cf47e0c1ce313873a49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g505xm`=Kufz diff --git a/src/net/grosinger/nomads/NeighborObjective.java b/src/net/grosinger/nomads/NeighborObjective.java index e6c78e9..b9a8c35 100644 --- a/src/net/grosinger/nomads/NeighborObjective.java +++ b/src/net/grosinger/nomads/NeighborObjective.java @@ -3,9 +3,9 @@ package net.grosinger.nomads; public class NeighborObjective implements GameObject { private String name; - int x; - int y; - Objective reference; + private int x; + private int y; + private Objective reference; public NeighborObjective(int x, int y, Objective obj) { reference = obj; diff --git a/src/net/grosinger/nomads/buildings/PoliceStation.java b/src/net/grosinger/nomads/buildings/PoliceStation.java index a366693..19bce15 100644 --- a/src/net/grosinger/nomads/buildings/PoliceStation.java +++ b/src/net/grosinger/nomads/buildings/PoliceStation.java @@ -12,6 +12,6 @@ public class PoliceStation extends NeighborBuilding { super(x, y, name, building, drone); } - // TODO - Implement Police Station + // There are no special actions performed from a Police Station } diff --git a/src/net/grosinger/nomads/drones/DroneListItem.java b/src/net/grosinger/nomads/drones/DroneListItem.java index f2b04fd..87f20a7 100644 --- a/src/net/grosinger/nomads/drones/DroneListItem.java +++ b/src/net/grosinger/nomads/drones/DroneListItem.java @@ -8,7 +8,6 @@ import net.grosinger.nomads.Inventory; import net.grosinger.nomads.MoneyPile; import net.grosinger.nomads.Nomads; import net.grosinger.nomads.Objective; -import net.grosinger.nomads.Upgrade; import net.grosinger.nomads.Upgrade.UpgradeType; import net.grosinger.nomads.exceptions.FullInventoryException; @@ -502,6 +501,7 @@ public class DroneListItem { * Finds who the drone wants to attack and attempts to perform attack. */ private void doAttack() { + // TODO - Add damage, instead of just killing instantly NeighborDrone victimNeighbor = current.attack(); if (victimNeighbor == null) { diff --git a/src/net/grosinger/nomads/drones/Police.java b/src/net/grosinger/nomads/drones/Police.java index b4adf12..3ac6a1d 100644 --- a/src/net/grosinger/nomads/drones/Police.java +++ b/src/net/grosinger/nomads/drones/Police.java @@ -57,6 +57,9 @@ public class Police implements Drone { @Override public EnumMove move() { + if (DEBUGGINGALL) { + System.out.println("Policeman about to move"); + } // A police drone will move semi-randomly, looking for neighbors. // Upon finding neighbors it will scan them to see if any of them are // wanted. If one is wanted it will start to pursue them and attempt to @@ -79,4 +82,8 @@ public class Police implements Drone { // TODO - Implement Police Attack return null; } + + public void requestBackup() { + + } } diff --git a/src/net/grosinger/nomads/exceptions/BadRequestException.java b/src/net/grosinger/nomads/exceptions/BadRequestException.java index b7ff85f..e3a7033 100644 --- a/src/net/grosinger/nomads/exceptions/BadRequestException.java +++ b/src/net/grosinger/nomads/exceptions/BadRequestException.java @@ -1,5 +1,6 @@ package net.grosinger.nomads.exceptions; +@SuppressWarnings("serial") public class BadRequestException extends Exception { public BadRequestException(String message) { diff --git a/src/net/grosinger/nomads/exceptions/FullInventoryException.java b/src/net/grosinger/nomads/exceptions/FullInventoryException.java index 7d01110..ed46197 100644 --- a/src/net/grosinger/nomads/exceptions/FullInventoryException.java +++ b/src/net/grosinger/nomads/exceptions/FullInventoryException.java @@ -1,5 +1,6 @@ package net.grosinger.nomads.exceptions; +@SuppressWarnings("serial") public class FullInventoryException extends Exception { public FullInventoryException() { diff --git a/src/net/grosinger/nomads/exceptions/InsufficientFundsException.java b/src/net/grosinger/nomads/exceptions/InsufficientFundsException.java index 625abdb..0ae9899 100644 --- a/src/net/grosinger/nomads/exceptions/InsufficientFundsException.java +++ b/src/net/grosinger/nomads/exceptions/InsufficientFundsException.java @@ -1,5 +1,6 @@ package net.grosinger.nomads.exceptions; +@SuppressWarnings("serial") public class InsufficientFundsException extends Exception { public InsufficientFundsException() { diff --git a/src/net/grosinger/nomads/exceptions/InvalidUpgradeException.java b/src/net/grosinger/nomads/exceptions/InvalidUpgradeException.java index 2175373..c834684 100644 --- a/src/net/grosinger/nomads/exceptions/InvalidUpgradeException.java +++ b/src/net/grosinger/nomads/exceptions/InvalidUpgradeException.java @@ -1,5 +1,6 @@ package net.grosinger.nomads.exceptions; +@SuppressWarnings("serial") public class InvalidUpgradeException extends Exception { public InvalidUpgradeException(String reason){ diff --git a/src/net/grosinger/nomads/exceptions/ObjectReferenceOutdatedException.java b/src/net/grosinger/nomads/exceptions/ObjectReferenceOutdatedException.java index 63d079b..78f3149 100644 --- a/src/net/grosinger/nomads/exceptions/ObjectReferenceOutdatedException.java +++ b/src/net/grosinger/nomads/exceptions/ObjectReferenceOutdatedException.java @@ -1,5 +1,6 @@ package net.grosinger.nomads.exceptions; +@SuppressWarnings("serial") public class ObjectReferenceOutdatedException extends Exception { public ObjectReferenceOutdatedException() {