Documentation ¶
Index ¶
- Variables
- func AddPlayResult(sv IService, pr *sgc7pb.ReplyPlay, results []*sgc7game.PlayResult)
- func BuildPBGameConfig(cfg *sgc7game.Config) *sgc7pb.GameConfig
- func BuildPBGameScene(gs *sgc7game.GameScene) *sgc7pb.GameScene
- func BuildPBGameScenePlayResult(r *sgc7game.Result) *sgc7pb.GameScenePlayResult
- func BuildPBLineData(ld *sgc7game.LineData) *sgc7pb.LinesData
- func BuildPBPayTables(pt *sgc7game.PayTables) map[int32]*sgc7pb.Row
- func BuildPBReelsData(rd *sgc7game.ReelsData) *sgc7pb.ReelsData
- func BuildPBRngs(rngs []*sgc7utils.RngInfo) []*sgc7pb.RngInfo
- func BuildStake(stake *sgc7pb.Stake) *sgc7game.Stake
- func MergeReplyPlay(dst *sgc7pb.ReplyPlay, src *sgc7pb.ReplyPlay)
- type BasicService
- type Client
- func (client *Client) GetConfig(ctx context.Context) (*sgc7pb.GameConfig, error)
- func (client *Client) Initialize(ctx context.Context) (*sgc7pb.PlayerState, error)
- func (client *Client) Play(ctx context.Context, ps *sgc7pb.PlayerState, cheat string, stake *sgc7pb.Stake, ...) (*sgc7pb.ReplyPlay, error)
- type IService
- type Serv
- func (serv *Serv) GetConfig(ctx context.Context, req *sgc7pb.RequestConfig) (*sgc7pb.GameConfig, error)
- func (serv *Serv) Initialize(ctx context.Context, req *sgc7pb.RequestInitialize) (*sgc7pb.PlayerState, error)
- func (serv *Serv) Play(req *sgc7pb.RequestPlay, stream sgc7pb.DTGameLogic_PlayServer) error
- func (serv *Serv) ProcCheat(plugin sgc7plugin.IPlugin, cheat string) error
- func (serv *Serv) Start(ctx context.Context) error
- func (serv *Serv) Stop()
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidBasicPlayerState - invalid BasicPlayerState ErrInvalidBasicPlayerState = errors.New("invalid BasicPlayerState") )
Functions ¶
func AddPlayResult ¶
func AddPlayResult(sv IService, pr *sgc7pb.ReplyPlay, results []*sgc7game.PlayResult)
AddPlayResult - []*sgc7game.PlayResult => *PlayResult
func BuildPBGameConfig ¶ added in v0.5.10
func BuildPBGameConfig(cfg *sgc7game.Config) *sgc7pb.GameConfig
BuildPBGameConfig - *sgc7game.Config -> *sgc7pb.GameConfig
func BuildPBGameScene ¶ added in v0.5.10
BuildPBGameScene - *sgc7game.GameScene -> *sgc7pb.GameScene
func BuildPBGameScenePlayResult ¶ added in v0.5.5
func BuildPBGameScenePlayResult(r *sgc7game.Result) *sgc7pb.GameScenePlayResult
BuildPBGameScenePlayResult - *sgc7game.Result -> *sgc7pb.GameScenePlayResult
func BuildPBLineData ¶ added in v0.5.10
BuildPBLineData - *sgc7game.LineData -> *sgc7pb.LinesData
func BuildPBPayTables ¶ added in v0.5.10
BuildPBPayTables - *sgc7game.PayTables -> map[int32]*Row
func BuildPBReelsData ¶ added in v0.5.10
BuildPBReelsData - *sgc7game.ReelsData -> *sgc7pb.ReelsData
func BuildPBRngs ¶ added in v0.5.5
BuildPBRngs - []*sgc7utils.RngInfo => []*sgc7pb.RngInfo
func BuildStake ¶ added in v0.5.5
BuildStake - PlayerState => sgc7game.IPlayerState
Types ¶
type BasicService ¶
type BasicService struct { }
BasicService - BasicService
func (*BasicService) BuildPBPlayerState ¶
func (bs *BasicService) BuildPBPlayerState(ps sgc7game.IPlayerState) (*sgc7pb.PlayerState, error)
BuildPBPlayerState - sgc7game.IPlayerState -> *sgc7pb.PlayerState
func (*BasicService) BuildPlayerStateFromPB ¶
func (bs *BasicService) BuildPlayerStateFromPB(ps *sgc7pb.PlayerState) (sgc7game.IPlayerState, error)
BuildPlayerStateFromPB - *sgc7pb.PlayerState -> sgc7game.IPlayerState
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client - DTGameLogicClient
func (*Client) Initialize ¶
Initialize - initialize a player
type IService ¶
type IService interface { // BuildPlayerStateFromPB - *sgc7pb.PlayerState -> sgc7game.IPlayerState BuildPlayerStateFromPB(ps *sgc7pb.PlayerState) (sgc7game.IPlayerState, error) // BuildPBPlayerState - sgc7game.IPlayerState -> *sgc7pb.PlayerState BuildPBPlayerState(ps sgc7game.IPlayerState) (*sgc7pb.PlayerState, error) // BuildPBGameModParam - interface{} -> *any.Any BuildPBGameModParam(gp interface{}) (*any.Any, error) }
IService - service
type Serv ¶
type Serv struct { sgc7pb.UnimplementedDTGameLogicServer // contains filtered or unexported fields }
Serv - DreamTech Service
func (*Serv) GetConfig ¶
func (serv *Serv) GetConfig(ctx context.Context, req *sgc7pb.RequestConfig) (*sgc7pb.GameConfig, error)
GetConfig - get config
func (*Serv) Initialize ¶
func (serv *Serv) Initialize(ctx context.Context, req *sgc7pb.RequestInitialize) (*sgc7pb.PlayerState, error)
Initialize - initialize a player
func (*Serv) Play ¶
func (serv *Serv) Play(req *sgc7pb.RequestPlay, stream sgc7pb.DTGameLogic_PlayServer) error
Play - play game