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 "