Back-end state to json package conversion #2

Closed
opened 2024-11-14 14:46:47 +00:00 by leon-adsk · 2 comments
leon-adsk commented 2024-11-14 14:46:47 +00:00 (Migrated from github.com)
  • Current game state (board, pieces, players, etc.) to JSON
  • Make game-state available to front-end
- [x] Current game state (board, pieces, players, etc.) to JSON - [x] Make game-state available to front-end
leon-adsk commented 2024-11-20 17:41:07 +00:00 (Migrated from github.com)

current json format when converting 2x2 test board

[
    [
        {
            "pieces": [],
            "sprite": "white.png",
            "x": 0,
            "y": 0,
            "tileName": "ChessTile"
        },
        {
            "pieces": [
                {
                    "sprite": "pawn.png",
                    "pieceName": "Pawn",
                    "player": "p0"
                }
            ],
            "sprite": "black.png",
            "x": 0,
            "y": 1,
            "tileName": "ChessTile"
        }
    ],
    [
        {
            "pieces": [],
            "sprite": "black.png",
            "x": 1,
            "y": 0,
            "tileName": "ChessTile"
        },
        {
            "pieces": [],
            "sprite": "white.png",
            "x": 1,
            "y": 1,
            "tileName": "ChessTile"
        }
    ]
]
current json format when converting 2x2 test board ```json [ [ { "pieces": [], "sprite": "white.png", "x": 0, "y": 0, "tileName": "ChessTile" }, { "pieces": [ { "sprite": "pawn.png", "pieceName": "Pawn", "player": "p0" } ], "sprite": "black.png", "x": 0, "y": 1, "tileName": "ChessTile" } ], [ { "pieces": [], "sprite": "black.png", "x": 1, "y": 0, "tileName": "ChessTile" }, { "pieces": [], "sprite": "white.png", "x": 1, "y": 1, "tileName": "ChessTile" } ] ] ```
leon-adsk commented 2024-11-23 14:11:52 +00:00 (Migrated from github.com)

currently the view folder which will contain the front end need to be located in src/view of the implementing project (in our case the chess project), I want to move this later but keep it in mind for now.

currently the view folder which will contain the front end need to be located in src/view of the implementing project (in our case the chess project), I want to move this later but keep it in mind for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
leon-adsk/r2-boardgames-a#2
No description provided.