1
0

Changed to account for overhaul of Nomads

Signed-off-by: Tony Grosinger <github2@grosinger.net>
This commit is contained in:
Tony Grosinger 2011-04-22 19:42:28 -07:00
parent f5646c5cae
commit 893faa9140
3 changed files with 35 additions and 9 deletions

View File

@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="C:/Users/tgrosinger/Dropbox/Programming/Java/Nomads/Nomads-0.0.1.jar"/>
<classpathentry kind="lib" path="C:/Users/tgrosinger/Dropbox/Programming/Java/Nomads-Sample-Drone/Nomads.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,20 +1,46 @@
package net.grosinger.nomads.sampleDrone;
import net.grosinger.nomads.Drone;
import net.grosinger.nomads.DroneListItem.EnumMove;
import net.grosinger.nomads.DroneTools;
public class SampleDrone extends Drone {
public class SampleDrone implements Drone {
// You can change this if you want
private static final boolean DEBUGGINGALL = true;
/*
* Override the move method. This is your main way of doing anything
*/
// Define any variables that you need
private DroneTools tools;
private String name;
// Leave these methods alone, they are required //
@Override
public void move() {
public String getName() {
return name;
}
@Override
public void setName(String newName) {
name = newName;
}
@Override
public void setDroneTools(DroneTools newTools) {
tools = newTools;
}
// Edit from here down //
@Override
public EnumMove move() {
if (DEBUGGINGALL)
System.out.println("SampleDrone initiating move...");
if (DEBUGGINGALL)
System.out.println("SampleDrone finished move");
if (tools.canMoveEast())
return EnumMove.East;
else if (tools.canMoveSouth())
return EnumMove.South;
else
return EnumMove.NoMove;
}
}