From e9ceb0bdd6c7db67573dd2a0f4618fa01aa694f4 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 11 Apr 2018 20:49:26 +0900 Subject: [PATCH] =?UTF-8?q?Citys=20=ED=95=A8=EC=88=98=EB=AA=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_legacy.php | 11 +++++----- hwe/processing.php | 52 ++++++++++++++++++++++----------------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/hwe/func_legacy.php b/hwe/func_legacy.php index 41ce5a86..7d21d793 100644 --- a/hwe/func_legacy.php +++ b/hwe/func_legacy.php @@ -41,11 +41,10 @@ function bar($per, $h=7) { } -function OptionsForCitys() { - foreach(CityConst::all() as $city){ - echo " - "; - } +function optionsForCities() { + return join('', function($city){ + return ""; + }, CityConst::all()); } function Submit($url, $msg="", $msg2="") { @@ -88,7 +87,7 @@ function closeButton() { } -function printCitysName(int $cityNo, int $maxDistance=1) { +function printCitiesBasedOnDistance(int $cityNo, int $maxDistance=1) { $distanceList = searchDistance($cityNo, $maxDistance, true); for($dist = 1; $dist <= $maxDistance; $dist++){ diff --git a/hwe/processing.php b/hwe/processing.php index 06379028..54c77eac 100644 --- a/hwe/processing.php +++ b/hwe/processing.php @@ -680,7 +680,7 @@ function command_16($turn, $command) { {$currentcity['name']} => @@ -696,7 +696,7 @@ function command_16($turn, $command) { "; - printCitysName($currentcity['city'], 1); + printCitiesBasedOnDistance($currentcity['city'], 1); ender(); } @@ -724,7 +724,7 @@ function command_21($turn, $command) { {$currentcity['name']} => @@ -739,7 +739,7 @@ function command_21($turn, $command) { "; - printCitysName($currentcity['city'], 1); + printCitiesBasedOnDistance($currentcity['city'], 1); ender(); } @@ -1077,7 +1077,7 @@ function command_27($turn, $command) { => @@ -1118,7 +1118,7 @@ function command_30($turn, $command) { {$currentcity['name']} => @@ -1133,7 +1133,7 @@ echo " "; -printCitysName($currentcity['city'], 3); +printCitiesBasedOnDistance($currentcity['city'], 3); ender(); } @@ -1161,7 +1161,7 @@ function command_31($turn, $command) { {$currentcity['name']} => @@ -1180,7 +1180,7 @@ function command_31($turn, $command) { 모든 도시가 가능하지만 많은 정보를 얻을 수 있는
"; - printCitysName($currentcity['city'], 2); + printCitiesBasedOnDistance($currentcity['city'], 2); ender(); } @@ -1207,7 +1207,7 @@ function command_32($turn, $command) { {$currentcity['name']} => @@ -1222,7 +1222,7 @@ function command_32($turn, $command) { "; - printCitysName($currentcity['city'], 2); + printCitiesBasedOnDistance($currentcity['city'], 2); ender(); } @@ -1249,7 +1249,7 @@ function command_33($turn, $command) { {$currentcity['name']} => @@ -1264,7 +1264,7 @@ function command_33($turn, $command) { "; - printCitysName($currentcity['city'], 2); + printCitiesBasedOnDistance($currentcity['city'], 2); ender(); } @@ -1291,7 +1291,7 @@ function command_34($turn, $command) { {$currentcity['name']} => @@ -1306,7 +1306,7 @@ function command_34($turn, $command) { "; - printCitysName($currentcity['city'], 2); + printCitiesBasedOnDistance($currentcity['city'], 2); ender(); } @@ -1333,7 +1333,7 @@ function command_35($turn, $command) { {$currentcity['name']} => @@ -1348,7 +1348,7 @@ function command_35($turn, $command) { "; - printCitysName($currentcity['city'], 2); + printCitiesBasedOnDistance($currentcity['city'], 2); ender(); } @@ -1375,7 +1375,7 @@ function command_36($turn, $command) { {$currentcity['name']} => @@ -1390,7 +1390,7 @@ function command_36($turn, $command) { "; - printCitysName($currentcity['city'], 2); + printCitiesBasedOnDistance($currentcity['city'], 2); ender(); } @@ -2289,7 +2289,7 @@ echo "
@@ -2330,7 +2330,7 @@ echo "
@@ -2371,7 +2371,7 @@ echo "
@@ -2412,7 +2412,7 @@ echo "
@@ -2453,7 +2453,7 @@ echo "
@@ -2494,7 +2494,7 @@ echo "
@@ -2535,7 +2535,7 @@ echo "