Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[後端] 玩家出道路卡 #31

Open
Jacky0428 opened this issue Nov 30, 2023 · 0 comments
Open

[後端] 玩家出道路卡 #31

Jacky0428 opened this issue Nov 30, 2023 · 0 comments
Assignees

Comments

@Jacky0428
Copy link
Contributor

Jacky0428 commented Nov 30, 2023

內容:

[POST] /api/games/{gameId}:playCard

Request

{
      "playerId": "playerId",
      "type": "PATH",
      "handIndex": 1,
      "row": 1,
      "col": 1,
      "flipped": false
}

Response (http 204)

Web socket
channel: 'PLAYER_CARD_PLACED'
message:

{
    "type": "PATH",
    "playerName": "name",
    "card": {
	"row": 0,
	"col": 0,
	"name": "Cross",
	"flipped": false
    }
}

channel: 'GAME_NEXT_PLAYER'
message:

{
    "nextPlayerName": "name",
}

驗收:


相關資料:

@Jacky0428 Jacky0428 self-assigned this Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant