Archived
1
0

-Implemented LumaLocator

-Deleted old drawings

Signed-off-by: Tony Grosinger <tony@grosinger.net>
This commit is contained in:
Tony Grosinger 2011-09-21 13:09:03 -07:00
parent fbdffb5905
commit c6dd0455a5
6 changed files with 18 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

View File

@ -233,8 +233,24 @@ public class DroneTools {
* @return ArrayList of Points * @return ArrayList of Points
*/ */
public ArrayList<Point> checkLumaLocator() { public ArrayList<Point> checkLumaLocator() {
// TODO - Implement LumaLocator ArrayList<Point> neighbors = new ArrayList<Point>();
return null; int maxDistance = listItem.getLumaLocatorDistance();
for (int i = maxDistance * -1; i <= maxDistance; i++) {
for (int j = maxDistance * -1; j <= maxDistance; j++) {
if (getX() + i >= worldSize - 1 || getX() + i < 0 || getY() + j >= worldSize - 1
|| getY() + j < 0) {
} else if (i != 0 && j != 0) {
GameObject objectHere = worldReference.getObjectAt(getX() + i, getY() + j);
if (objectHere instanceof MoneyPile) {
MoneyPile pile = (MoneyPile) objectHere;
Point location = new Point(getX() + i, getY() + j);
neighbors.add(location);
}
}
}
}
return neighbors;
} }
/** /**