From d2066409b9a5b78c1a2b9a3eec4c6c66e536a6d2 Mon Sep 17 00:00:00 2001 From: "jason@long.name" Date: Mon, 18 Feb 2013 01:57:35 +0000 Subject: [PATCH] cleanup: make buildHouse() use xpos,ypos properties not parameters git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@551 d9718cc8-9f43-0410-858b-315f434eb58c --- src/micropolisj/engine/MapScanner.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/micropolisj/engine/MapScanner.java b/src/micropolisj/engine/MapScanner.java index eb2b23d..34c7c22 100644 --- a/src/micropolisj/engine/MapScanner.java +++ b/src/micropolisj/engine/MapScanner.java @@ -983,6 +983,12 @@ class MapScanner } } + /** + * Consider the value of building a single-lot house at certain + * coordinates. + * @return integer; positive number indicates good place for + * house to go; zero or a negative number indicates a bad place. + */ int evalLot(int x, int y) { // test for clear lot @@ -1013,7 +1019,10 @@ class MapScanner return score; } - private void buildHouse(int xpos, int ypos, int value) + /** + * Build a single-lot house on the current residential zone. + */ + private void buildHouse(int value) { assert value >= 0 && value <= 3; @@ -1095,7 +1104,7 @@ class MapScanner { if (pop < 8) { - buildHouse(xpos, ypos, value); + buildHouse(value); incrementROG(xpos, ypos, 1); return; }