appmain

package
v0.0.0-...-cd1bf01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlayerstatuThinking       = base.PlayerstatuBeginGame + 1
	PlayerstatuWaitOtherGuess = base.PlayerstatuBeginGame + 2
)

主玩法逻辑示例

Variables

This section is empty.

Functions

This section is empty.

Types

type GuessLogic

type GuessLogic struct {
	gamelogic.FactoryGameLogic
}

func (*GuessLogic) AppMsgCallBackInit

func (g *GuessLogic) AppMsgCallBackInit(mapMsg map[string]base.MsgHandler)

AppMsgCallBack 应用层用来注册消息回调,重写方法,例如:mapMsg["LeaveTable"]= f.handleLeaveTableReq

func (*GuessLogic) AutoPlay

func (g *GuessLogic) AutoPlay(player base.IPlayerNode)

func (*GuessLogic) CallBackGameStart

func (g *GuessLogic) CallBackGameStart(table base.ITable)

CallBackGameStart 游戏层重写游戏对局开始的逻辑

func (*GuessLogic) CallBackHandUp

func (g *GuessLogic) CallBackHandUp(player base.IPlayerNode, table base.ITable)

CallBackHandUp 游戏层重写玩家举手后的逻辑

func (*GuessLogic) CallBackLeaveTable

func (g *GuessLogic) CallBackLeaveTable(player base.IPlayerNode, table base.ITable)

CallBackLeaveTable 游戏层重写离桌后的逻辑

func (*GuessLogic) CallBackLogOut

func (g *GuessLogic) CallBackLogOut(player base.IPlayerNode)

CallBackLogOut 游戏层重写用户完全退出房间后的逻辑

func (*GuessLogic) CallBackLoginAgain

func (g *GuessLogic) CallBackLoginAgain(player base.IPlayerNode)

CallBackLoginAgain 游戏层重写玩家断线重连的逻辑

func (*GuessLogic) CallBackOffline

func (g *GuessLogic) CallBackOffline(player base.IPlayerNode)

CallBackOffline 游戏层重写用户断线的逻辑

func (*GuessLogic) CallBackSendRoomInfo

func (g *GuessLogic) CallBackSendRoomInfo(player base.IPlayerNode)

CallBackSendRoomInfo 游戏层重写,同步游戏特有信息到c端

func (*GuessLogic) CallBackSitDown

func (g *GuessLogic) CallBackSitDown(player base.IPlayerNode, table base.ITable)

CallBackSitDown 游戏层重写玩家入座成功后的逻辑

func (*GuessLogic) CallLoginSuccess

func (g *GuessLogic) CallLoginSuccess(player base.IPlayerNode)

CallLoginSuccess 游戏层重写登录成功后的逻辑

func (*GuessLogic) CheckNeedPeiPai

func (g *GuessLogic) CheckNeedPeiPai(player base.IPlayerNode, TableLevel int32) bool

CheckNeedPeiPai 游戏层重写新手配牌的逻辑

func (*GuessLogic) CreateClientPlayer

func (g *GuessLogic) CreateClientPlayer(player base.IPlayerNode)

func (*GuessLogic) CreateTable

func (g *GuessLogic) CreateTable(table base.ITable)

用来设置上层业务桌子数据

func (*GuessLogic) OnExit

func (g *GuessLogic) OnExit()

func (*GuessLogic) RecoverRobot

func (g *GuessLogic) RecoverRobot(userid int64, gameCoin int64)

RecoverRobot 游戏层重写,回收机器人

type GuessPlayerNode

type GuessPlayerNode struct {
	//appgame property start here
	Guesstype int8
}

type GuessReq

type GuessReq struct {
	Guesstype int8
}

type GuessRes

type GuessRes struct {
	Guesstype int8
}

type GuessResult

type GuessResult struct {
	Guesstype [2]int8
	Socres    [2]int
}

type GuessRobotLogic

type GuessRobotLogic struct {
	robotlogic.RobotLogic
}

AI逻辑示例

func (*GuessRobotLogic) OnCreateRobot

func (g *GuessRobotLogic) OnCreateRobot() base.IPlayerNode

func (*GuessRobotLogic) RegisteRobotMsg

func (g *GuessRobotLogic) RegisteRobotMsg()

type GuessRobotNode

type GuessRobotNode struct {
	robotlogic.RobotNode
	// contains filtered or unexported fields
}

type GuessStartNotice

type GuessStartNotice struct {
}

type GuessTable

type GuessTable struct {
	base.GameTable
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL