-Updated for newest version
-Added test to find neighbors Signed-off-by: Tony Grosinger <github2@grosinger.net>
This commit is contained in:
parent
f0c8b783fa
commit
140397572e
Binary file not shown.
@ -9,9 +9,12 @@ public class SampleDrone implements Drone {
|
|||||||
// You can change this if you want
|
// You can change this if you want
|
||||||
private static final boolean DEBUGGINGALL = true;
|
private static final boolean DEBUGGINGALL = true;
|
||||||
|
|
||||||
|
//Do not change these
|
||||||
|
private String name;
|
||||||
|
private String UID;
|
||||||
|
|
||||||
// Define any variables that you need
|
// Define any variables that you need
|
||||||
private DroneTools tools;
|
private DroneTools tools;
|
||||||
private String name;
|
|
||||||
|
|
||||||
// Leave these methods alone, they are required //
|
// Leave these methods alone, they are required //
|
||||||
|
|
||||||
@ -25,6 +28,16 @@ public class SampleDrone implements Drone {
|
|||||||
name = newName;
|
name = newName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUID(String newUID) {
|
||||||
|
UID = newUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUID() {
|
||||||
|
return UID;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDroneTools(DroneTools newTools) {
|
public void setDroneTools(DroneTools newTools) {
|
||||||
tools = newTools;
|
tools = newTools;
|
||||||
@ -44,6 +57,9 @@ public class SampleDrone implements Drone {
|
|||||||
System.out.println("I am not in a safe zone");
|
System.out.println("I am not in a safe zone");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tools.checkRadar();
|
||||||
|
|
||||||
if (tools.canMoveEast())
|
if (tools.canMoveEast())
|
||||||
return EnumMove.East;
|
return EnumMove.East;
|
||||||
else if (tools.canMoveSouth())
|
else if (tools.canMoveSouth())
|
||||||
|
Reference in New Issue
Block a user