1
0

Updated to use NeighborDrone instead of Neighbor

Signed-off-by: Tony Grosinger <tony@grosinger.net>
This commit is contained in:
Tony Grosinger 2011-09-10 22:36:27 -07:00
parent ebc5e74893
commit 891002c646
2 changed files with 15 additions and 19 deletions

View File

@ -3,7 +3,7 @@ package net.grosinger.nomads.sampleDrone;
import net.grosinger.nomads.Drone;
import net.grosinger.nomads.DroneListItem.EnumMove;
import net.grosinger.nomads.DroneTools;
import net.grosinger.nomads.Neighbor;
import net.grosinger.nomads.NeighborDrone;
import net.grosinger.nomads.Upgrade;
public class SampleDrone implements Drone {
@ -11,7 +11,7 @@ public class SampleDrone implements Drone {
// You can change this if you want
private static final boolean DEBUGGINGALL = true;
//Do not change these
// Do not change these
private String name;
private String UID;
@ -49,15 +49,10 @@ public class SampleDrone implements Drone {
@Override
public EnumMove move() {
if (DEBUGGINGALL){
if (DEBUGGINGALL) {
System.out.println("SampleDrone initiating move...");
System.out.println("Current X = " + tools.getX());
System.out.println("Current Y = " + tools.getY());
if(tools.inSafeZone()){
System.out.println("I am in a safe zone");
}else{
System.out.println("I am not in a safe zone");
}
}
tools.checkRadar();
@ -66,25 +61,26 @@ public class SampleDrone implements Drone {
return EnumMove.East;
else if (tools.canMoveSouth())
return EnumMove.South;
else if (tools.canMoveWest())
return EnumMove.West;
else if (tools.canMoveNorth())
return EnumMove.North;
else
return EnumMove.NoMove;
}
@Override
public Neighbor steal() {
// TODO Auto-generated method stub
public NeighborDrone steal() {
return null;
}
@Override
public Neighbor attack() {
// TODO Auto-generated method stub
public NeighborDrone attack() {
return null;
}
@Override
public Upgrade upgrade() {
// TODO Auto-generated method stub
return null;
}
}