summaryrefslogtreecommitdiff
path: root/src/gemini/Gemini.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-01-15 13:43:05 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-01-15 13:43:05 +0100
commit254eb4a9959e4c281fdeb47378a654de978cb1e4 (patch)
treec2c4bb19e2c16cddc82988f50de79c718f381b22 /src/gemini/Gemini.php
parent09caff2b2a06d1f8ac8203567035a21c612165f9 (diff)
events and satisfaction
Diffstat (limited to 'src/gemini/Gemini.php')
-rw-r--r--src/gemini/Gemini.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gemini/Gemini.php b/src/gemini/Gemini.php
index 23915d0..4567958 100644
--- a/src/gemini/Gemini.php
+++ b/src/gemini/Gemini.php
@@ -104,6 +104,30 @@ class Gemini
$response = $unitController->train($request);
}
+ else if (preg_match('@village/(\d+)/(\d+)/unit/(\w+)/location/(\d+)/(\d+)/recall@', $request->getPath(), $routeMatch)) {
+ $request
+ ->set('x', $routeMatch[1])
+ ->set('y', $routeMatch[2])
+ ->set('type', $routeMatch[3])
+ ->set('lx', $routeMatch[4])
+ ->set('ly', $routeMatch[5]);
+
+ $unitController = new Unit();
+ $response = $unitController->recall($request);
+ }
+
+ else if (preg_match('@village/(\d+)/(\d+)/unit/(\w+)/location/(\d+)/(\d+)/send-back@', $request->getPath(), $routeMatch)) {
+ $request
+ ->set('x', $routeMatch[1])
+ ->set('y', $routeMatch[2])
+ ->set('type', $routeMatch[3])
+ ->set('lx', $routeMatch[4])
+ ->set('ly', $routeMatch[5]);
+
+ $unitController = new Unit();
+ $response = $unitController->sendBack($request);
+ }
+
else if (preg_match('@village/(\d+)/(\d+)/send-units@', $request->getPath(), $routeMatch)) {
$request
->set('x', $routeMatch[1])