From 2c517c476bf46e8340d4d236ed8b0a37209700b3 Mon Sep 17 00:00:00 2001 From: "jason@long.name" Date: Fri, 6 Dec 2013 02:48:00 +0000 Subject: [PATCH] cleanup: use named constants in isRiverEdge instead of hard-coded numbers git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@891 d9718cc8-9f43-0410-858b-315f434eb58c --- src/micropolisj/engine/TileConstants.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/micropolisj/engine/TileConstants.java b/src/micropolisj/engine/TileConstants.java index d93ff0b..bedfa10 100644 --- a/src/micropolisj/engine/TileConstants.java +++ b/src/micropolisj/engine/TileConstants.java @@ -357,7 +357,8 @@ public class TileConstants static boolean isRiverEdge(int tile) { - return (tile & LOMASK) > 4 && (tile & LOMASK) < 21; + tile &= LOMASK; + return tile >= FIRSTRIVEDGE && tile <= LASTRIVEDGE; } public static boolean isDozeable(int tile)