cleanup: rename canAutoBulldoze to canAutoBulldozeZ
since this method is only for when a ZONE is being placed (Z=Zone) git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@589 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
8b428bfc29
commit
d10ec8e5b1
1 changed files with 11 additions and 4 deletions
|
@ -142,7 +142,7 @@ public enum MicropolisTool
|
|||
{
|
||||
if (engine.autoBulldoze)
|
||||
{
|
||||
if (canAutoBulldoze(tileValue))
|
||||
if (canAutoBulldozeZ(tileValue))
|
||||
cost++;
|
||||
else
|
||||
canBuild = false;
|
||||
|
@ -204,7 +204,7 @@ public enum MicropolisTool
|
|||
{
|
||||
if (engine.autoBulldoze)
|
||||
{
|
||||
if (canAutoBulldoze(tileValue))
|
||||
if (canAutoBulldozeZ(tileValue))
|
||||
cost++;
|
||||
else
|
||||
canBuild = false;
|
||||
|
@ -267,7 +267,7 @@ public enum MicropolisTool
|
|||
{
|
||||
if (engine.autoBulldoze)
|
||||
{
|
||||
if (canAutoBulldoze(tileValue))
|
||||
if (canAutoBulldozeZ(tileValue))
|
||||
cost++;
|
||||
else
|
||||
canBuild = false;
|
||||
|
@ -331,8 +331,15 @@ public enum MicropolisTool
|
|||
}
|
||||
}
|
||||
|
||||
static boolean canAutoBulldoze(char tileValue)
|
||||
/**
|
||||
* Checks whether the tile can be auto-bulldozed for
|
||||
* placement of a zone.
|
||||
*/
|
||||
static boolean canAutoBulldozeZ(char tileValue)
|
||||
{
|
||||
//FIXME- explain why LASTTINYEXP+2 is the upper bound?
|
||||
//FIXME- what is significance of POWERBASE+2 and POWERBASE+12 ?
|
||||
|
||||
// can we autobulldoze this tile?
|
||||
if ((tileValue >= FIRSTRIVEDGE && tileValue <= LASTRUBBLE) ||
|
||||
(tileValue >= POWERBASE + 2 && tileValue <= POWERBASE + 12) ||
|
||||
|
|
Reference in a new issue