diff --git a/README.md b/README.md index 1e96ffa..ded394d 100644 --- a/README.md +++ b/README.md @@ -156,10 +156,11 @@ Response body: "position": { "x": 50, "y": 50 - }, + } }, "player": { "uuid": "75bba7cd-a4c1-4b50-b0b5-6382c2822a25", + "name": "Pero", "position": { "x": 0, "y": 10 @@ -191,6 +192,7 @@ Response body: { "player": { "uuid": "string", + "name": "Pero", "position": { "x": 50, "y": 50 @@ -212,6 +214,7 @@ Response body: { "player": { "uuid": "string", + "name": "Pero", "position": { "x": 50, "y": 50 @@ -266,29 +269,37 @@ Data: ```json { "board": { - "width": 101, - "height": 101 + "width": 21, + "height": 21 }, - "destinationPosition": { - "x": 50, - "y": 50 + "destination": { + "position": { + "x": 10, + "y": 10 + } }, "players": [ { - "id": "75bba7cd-a4c1-4b50-b0b5-6382c2822a25", + "uuid": "test-player-id", "name": "Pero", + "active": true, "position": { - "x": 0, - "y": 10 - } + "x": 2, + "y": 2 + }, + "move_count": 3, + "move_attempt_count": 3 }, { - "id": "04793b36-0785-4bf3-9396-3585c358cbac", + "uuid": "95962b49-0003-4bf2-b205-71f2590f2318", "name": "Mirko", + "active": true, "position": { - "x": 11, - "y": 12 - } + "x": 0, + "y": 0 + }, + "move_count": 15, + "move_attempt_count": 20 } ], "layers": [ @@ -296,17 +307,69 @@ Data: "name": "obstacles", "objects": [ { - "type": "obstacle", + "type": "OBSTACLE", "position": { - "x": 15, - "y": 25 + "x": 4, + "y": 2 } }, { - "type": "obstacle", + "type": "OBSTACLE", "position": { - "x": 33, - "y": 44 + "x": 4, + "y": 13 + } + }, + { + "type": "OBSTACLE", + "position": { + "x": 18, + "y": 18 + } + }, + { + "type": "OBSTACLE", + "position": { + "x": 5, + "y": 4 + } + }, + { + "type": "OBSTACLE", + "position": { + "x": 7, + "y": 10 + } + } + ] + }, + { + "name": "destination", + "objects": [ + { + "type": "DESTINATION", + "position": { + "x": 10, + "y": 10 + } + } + ] + }, + { + "name": "players", + "objects": [ + { + "type": "PLAYER", + "position": { + "x": 2, + "y": 2 + } + }, + { + "type": "PLAYER", + "position": { + "x": 0, + "y": 0 } } ] diff --git a/hopper/api/dto.py b/hopper/api/dto.py index c76be6f..4e34537 100644 --- a/hopper/api/dto.py +++ b/hopper/api/dto.py @@ -24,6 +24,7 @@ class PositionDto(BaseModel): class PlayerDto(BaseModel): uuid: str + name: str active: bool position: PositionDto move_count: int