From 70672bb87408b4186537ee2c455259312cd4e806 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Sun, 27 Nov 2011 03:16:33 -0800 Subject: Fix for broken start location. PHP improperly duplicates $v? --- includes/maps.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/maps.php b/includes/maps.php index d50175a..4ff205f 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -747,12 +747,17 @@ function findPath($mapMatrix, $start = '0,1', $target = 'f') { $v = explode(",", $v); $v[2] = $v[0].','.$v[1]; $v[3] = ''; + + //Remove Seeds as potential seeding slots. + $x = $v[0]; + $y = $v[1]; + unset($mapMatrix[$y][$x]); } $index = count($seed); do { - foreach ($seed as $key => $v) { + foreach ($seed as $key => &$v) { //Search the squares around, to spread the seeds for($i = 1; $i <= 4; $i++) { $x = $v[0]; -- cgit v1.2.3