fix: that's not supposed to be in there

This commit is contained in:
punchready 2021-06-01 00:52:24 +02:00
parent cce1622a45
commit 6c06beb366
1 changed files with 0 additions and 21 deletions

View File

@ -849,28 +849,7 @@ class GameLogic {
public static ArrayList<Event> handleThanos(GameState state, NPC thanos) {
ArrayList<Event> result = new ArrayList<>();
if(thanos.inventory.getFreeSlots() > 0) {
IntVector2 picked = null;
float lowestDistance = Integer.MAX_VALUE;
for(int x = 0; x < state.mapSize.getX(); x++) {
for(int y = 0; y < state.mapSize.getY(); y++) {
IntVector2 pos = new IntVector2(x, y);
for(Entity e: state.entities.findByPosition(pos)) {
if(e instanceof InfinityStone || (e instanceof Character && ((Character)e).inventory.getSize() > 0)) {
float distance = thanos.getPosition().distanceChebyshev(pos);
if(distance < lowestDistance) {
picked = pos;
lowestDistance = distance;
break;
}
}
}
}
}
//
}
return result;
}