Tile code cleanup

This commit is contained in:
Anuken
2020-03-03 19:29:41 -05:00
parent bac1648d4b
commit 087f8129b9
10 changed files with 75 additions and 103 deletions

View File

@@ -47,15 +47,12 @@ public class ZoneTests{
ObjectSet<Item> resources = new ObjectSet<>();
boolean hasSpawnPoint = false;
for(int x = 0; x < world.width(); x++){
for(int y = 0; y < world.height(); y++){
Tile tile = world.tile(x, y);
if(tile.drop() != null){
resources.add(tile.drop());
}
if(tile.block() instanceof CoreBlock && tile.team() == state.rules.defaultTeam){
hasSpawnPoint = true;
}
for(Tile tile : world.tiles){
if(tile.drop() != null){
resources.add(tile.drop());
}
if(tile.block() instanceof CoreBlock && tile.team() == state.rules.defaultTeam){
hasSpawnPoint = true;
}
}