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

POST /rooms/{roomId}:endGame #184

Closed
ricksu978 opened this issue Oct 29, 2023 · 1 comment
Closed

POST /rooms/{roomId}:endGame #184

ricksu978 opened this issue Oct 29, 2023 · 1 comment
Assignees

Comments

@ricksu978
Copy link
Member

ricksu978 commented Oct 29, 2023

這支 API 會由「遊戲小組」的後端來呼叫。

Example Mapping

Given:
- Room 01 狀態「正在遊戲中」
- Player A, B, C & D 在 Room 01 進行遊戲中

When:
- 遊戲結束時

Then:
- Room 01 狀態變成「等待中」
- Player A, B, C & D 依然在 Room 01,準備狀態為「未準備」
- 推送 "遊戲結束" 的 WebSocket 訊息到前端

遊戲結束的格式

{
  "type": "GAME_ENDED",
  "data": {
     "roomId": String,
  }
}
@ricksu978 ricksu978 converted this from a draft issue Oct 29, 2023
@ricksu978 ricksu978 changed the title POST /rooms/{roomId}:endGame POST /rooms/{roomId}:endGame Oct 29, 2023
@ted791029
Copy link
Contributor

已完成

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants