cleanup: doResidential{In,Out} use xpos,ypos properties

instead of having them be passed in as parameters

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@547 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-02-18 01:57:04 +00:00
parent e2c1a7eb6a
commit 273620b6c5

View file

@ -940,7 +940,7 @@ class MapScanner
if (trafficGood == -1) if (trafficGood == -1)
{ {
int value = getCRValue(xpos, ypos); int value = getCRValue(xpos, ypos);
doResidentialOut(xpos, ypos, tpop, value); doResidentialOut(tpop, value);
return; return;
} }
@ -961,14 +961,14 @@ class MapScanner
} }
int value = getCRValue(xpos, ypos); int value = getCRValue(xpos, ypos);
doResidentialIn(xpos, ypos, tpop, value); doResidentialIn(tpop, value);
return; return;
} }
if (zscore < 350 && zscore + 26380 < (PRNG.nextInt(0x10000)-0x8000)) if (zscore < 350 && zscore + 26380 < (PRNG.nextInt(0x10000)-0x8000))
{ {
int value = getCRValue(xpos, ypos); int value = getCRValue(xpos, ypos);
doResidentialOut(xpos, ypos, tpop, value); doResidentialOut(tpop, value);
} }
} }
} }
@ -1072,7 +1072,7 @@ class MapScanner
} }
} }
private void doResidentialIn(int xpos, int ypos, int pop, int value) private void doResidentialIn(int pop, int value)
{ {
assert value >= 0 && value <= 3; assert value >= 0 && value <= 3;
@ -1152,7 +1152,7 @@ class MapScanner
} }
} }
private void doResidentialOut(int xpos, int ypos, int pop, int value) private void doResidentialOut(int pop, int value)
{ {
assert value >= 0 && value < 4; assert value >= 0 && value < 4;