Explorar o código

Changement move par dir dans json player/move

Arthur Brandao %!s(int64=6) %!d(string=hai) anos
pai
achega
b912e89c87
Modificáronse 2 ficheiros con 22 adicións e 1 borrados
  1. 1 1
      Serveur/handler.c
  2. 21 0
      Serveur/map/mapTest

+ 1 - 1
Serveur/handler.c

@@ -438,7 +438,7 @@ int handler_player_move(int cliId, JsonParser* json) {
     if (ok) {
         ini_encoder(&reponse);
         add_integer(&reponse, "player", cliId);
-        add_string(&reponse, "move", move);
+        add_string(&reponse, "dir", move);
         notify_player(&game[index], "POST", "player/position/update", &reponse, -1);
         //Si marche sur une mine
         if (mine) {

+ 21 - 0
Serveur/map/mapTest

@@ -0,0 +1,21 @@
+---------------------
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+---------------------