28 lines
464 B
Go
28 lines
464 B
Go
package routes
|
|
|
|
import (
|
|
"game-driver/internal/routes/play"
|
|
"game-driver/leaf"
|
|
)
|
|
|
|
func PlayRouter(location string, point int) leaf.HandlerFunc {
|
|
switch location {
|
|
case "wushan":
|
|
return switchPoint(point)
|
|
default:
|
|
return play.Default
|
|
}
|
|
}
|
|
|
|
func switchPoint(point int) leaf.HandlerFunc {
|
|
switch point {
|
|
case 2: // 镇水塔点位
|
|
return play.OnlyVideo
|
|
case 4:
|
|
// 4号点位(发卡机)
|
|
return play.NewPushCard()
|
|
default:
|
|
return play.Default
|
|
}
|
|
}
|