behaviors: move exploding-tile processing to new TileBehavior-based class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@872 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
81c05604df
commit
e7cb33ca92
1 changed files with 7 additions and 2 deletions
|
@ -50,8 +50,7 @@ class TerrainBehavior extends TileBehavior
|
|||
doRail();
|
||||
return;
|
||||
case EXPLOSION:
|
||||
// clear AniRubble
|
||||
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
|
||||
doExplosion();
|
||||
return;
|
||||
default:
|
||||
assert false;
|
||||
|
@ -368,4 +367,10 @@ class TerrainBehavior extends TileBehavior
|
|||
}
|
||||
return dist;
|
||||
}
|
||||
|
||||
void doExplosion()
|
||||
{
|
||||
// clear AniRubble
|
||||
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue