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();
|
doRail();
|
||||||
return;
|
return;
|
||||||
case EXPLOSION:
|
case EXPLOSION:
|
||||||
// clear AniRubble
|
doExplosion();
|
||||||
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
|
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
assert false;
|
assert false;
|
||||||
|
@ -368,4 +367,10 @@ class TerrainBehavior extends TileBehavior
|
||||||
}
|
}
|
||||||
return dist;
|
return dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void doExplosion()
|
||||||
|
{
|
||||||
|
// clear AniRubble
|
||||||
|
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue