package game import ( "dcg/game/room" "git.noahlan.cn/northlan/ngs" "git.noahlan.cn/northlan/ngs/component" "git.noahlan.cn/northlan/ngs/serialize/protobuf" "strings" ) var ( Services = &component.Components{} RoomManager = room.NewRoomManager() ) func init() { Services.Register(RoomManager, component.WithName("room"), component.WithNameFunc(func(s string) string { return strings.ToLower(s) })) } func Run(listen string) { ngs.Listen(listen, ngs.WithComponents(Services), ngs.WithSerializer(protobuf.NewSerializer()), ngs.WithDebugMode()) }