소스 검색

Changement move par dir dans json player/move

Arthur Brandao 6 년 전
부모
커밋
b912e89c87
2개의 변경된 파일22개의 추가작업 그리고 1개의 파일을 삭제
  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 @@
+---------------------
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+-_*_*_*_*_*_*_*_*_*_-
+-___________________-
+---------------------