-Implemented LumaLocator
-Deleted old drawings Signed-off-by: Tony Grosinger <tony@grosinger.net>
This commit is contained in:
parent
fbdffb5905
commit
c6dd0455a5
Binary file not shown.
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.
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user