From: "Enrico Weigelt, metux IT consult" <[email protected]>
---
src/net/sf/freecol/common/model/Tile.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/net/sf/freecol/common/model/Tile.java
b/src/net/sf/freecol/common/model/Tile.java
index ed0957a15d0..fab54bf459d 100644
--- a/src/net/sf/freecol/common/model/Tile.java
+++ b/src/net/sf/freecol/common/model/Tile.java
@@ -43,6 +43,7 @@ import net.sf.freecol.common.model.Colony;
import net.sf.freecol.common.model.Direction;
import static net.sf.freecol.common.util.CollectionUtils.*;
import net.sf.freecol.common.util.RandomChoice;
+import net.sf.freecol.common.util.Utils;
import static net.sf.freecol.common.util.RandomUtils.*;
@@ -1187,8 +1188,11 @@ public final class Tile extends UnitLocation implements
Named, Ownable {
* {@code Tile}.
*/
public boolean isAdjacent(Tile tile) {
- return (tile == null) ? false
- : any(getSurroundingTiles(1, 1), matchKey(tile));
+ if (tile != null)
+ for (Tile t : getSurroundingTiles(1, 1))
+ if (tile == t)
+ return true;
+ return false;
}
/**
--
2.11.0.rc0.7.gbe5a750
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers