We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d701bf7 commit 0be8eeaCopy full SHA for 0be8eea
src/app/api/stage/route.ts
@@ -16,11 +16,20 @@ export const POST = async (request: NextRequest) => {
16
const { row, column, layer } = position;
17
// 使用 token 查詢對應stageID 的stage
18
// 將blockId 放置在 row, column, layer 指定的位置
19
- // prisma query here
+ // 判定玩家是否擁有該板塊 並且至少一塊
20
+ // 判定是否有其他東西
21
+ // 有則拒絕不給放
22
+ // 沒有則玩家對應板塊的數量 - 1
23
+ // 判定是否過關(isStageComplete())
24
+ // 如果過關
25
+ // 1.玩家point、score增加
26
+ // 2.製造新的關卡 (根據size加倍)(createStage())
27
// 將更新後的stageData 存入database
28
// return 更新過後的stageData 給前端
29
};
30
// 錯誤情況1: 並非本次與會者invalid token
31
// 錯誤情況2: 非法的blockId
32
// 錯誤情況3: 非法的position
-// 錯誤情況4: 抓取資料問題
33
+// 錯誤情況4: 沒有該板塊
34
+// 錯誤情況5: 該位置上已有其他板塊 or 障礙物
35
+// 錯誤情況6: 其他錯誤
0 commit comments