完成授书游戏节点功能
This commit is contained in:
@@ -1,26 +1,27 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"context"
|
||||
"game-driver/internal/routes/play"
|
||||
"game-driver/leaf"
|
||||
)
|
||||
|
||||
func PlayRouter(location string, point int) leaf.HandlerFunc {
|
||||
func PlayRouter(ctx context.Context, location string, point int) leaf.HandlerFunc {
|
||||
switch location {
|
||||
case "wushan":
|
||||
return switchPoint(point)
|
||||
return switchPoint(ctx, point)
|
||||
default:
|
||||
return play.Default
|
||||
}
|
||||
}
|
||||
|
||||
func switchPoint(point int) leaf.HandlerFunc {
|
||||
func switchPoint(ctx context.Context, point int) leaf.HandlerFunc {
|
||||
switch point {
|
||||
case 2: // 镇水塔点位
|
||||
return play.OnlyVideo
|
||||
case 4:
|
||||
// 4号点位(发卡机)
|
||||
return play.PushCard()
|
||||
return play.PushCard(ctx)
|
||||
default:
|
||||
return play.Default
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user