tool-effect: treat tiles outside of city boundary as dirt
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@892 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
2c517c476b
commit
721e135fee
2 changed files with 4 additions and 1 deletions
|
@ -42,7 +42,9 @@ class ToolEffect implements ToolEffectIfc
|
|||
return city.getTile(originX + dx, originY + dy);
|
||||
}
|
||||
else {
|
||||
return CLEAR;
|
||||
// tiles outside city's boundary assumed to be
|
||||
// tile #0 (dirt).
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ public interface ToolEffectIfc
|
|||
{
|
||||
/**
|
||||
* Gets the tile at a relative location.
|
||||
* @return a non-negative tile identifier
|
||||
*/
|
||||
int getTile(int dx, int dy);
|
||||
|
||||
|
|
Reference in a new issue