游戏节点配置嵌入在一个配置文件中
This commit is contained in:
16
config/game/game.go
Normal file
16
config/game/game.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package game
|
||||
|
||||
type Config any
|
||||
|
||||
func NewConfig(point int) Config {
|
||||
switch point {
|
||||
case 4:
|
||||
return ConfigPush{}
|
||||
case 5:
|
||||
return ConfigWait{}
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
var G Config
|
||||
7
config/game/push_card.go
Normal file
7
config/game/push_card.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package game
|
||||
|
||||
import "game-driver/internal/routes/play/card_pusher"
|
||||
|
||||
type ConfigPush struct {
|
||||
CardGroups []*card_pusher.LineGroup
|
||||
}
|
||||
5
config/game/wait_card.go
Normal file
5
config/game/wait_card.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package game
|
||||
|
||||
type ConfigWait struct {
|
||||
URL string
|
||||
}
|
||||
Reference in New Issue
Block a user