player

package
v0.0.0-...-a16fcf6 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int
View Source
var PlayerServiceGetNewOrdersResult_Success_DEFAULT []*Order
View Source
var PlayerServicePingResult_Success_DEFAULT bool
View Source
var PlayerSystemException_Message_DEFAULT string
View Source
var PlayerUserException_Message_DEFAULT string

Functions

This section is empty.

Types

type Args_

type Args_ struct {
	TankSpeed        int32 `thrift:"tankSpeed,1" db:"tankSpeed" json:"tankSpeed"`
	ShellSpeed       int32 `thrift:"shellSpeed,2" db:"shellSpeed" json:"shellSpeed"`
	TankHP           int32 `thrift:"tankHP,3" db:"tankHP" json:"tankHP"`
	TankScore        int32 `thrift:"tankScore,4" db:"tankScore" json:"tankScore"`
	FlagScore        int32 `thrift:"flagScore,5" db:"flagScore" json:"flagScore"`
	MaxRound         int32 `thrift:"maxRound,6" db:"maxRound" json:"maxRound"`
	RoundTimeoutInMs int32 `thrift:"roundTimeoutInMs,7" db:"roundTimeoutInMs" json:"roundTimeoutInMs"`
}

Attributes:

  • TankSpeed
  • ShellSpeed
  • TankHP
  • TankScore
  • FlagScore
  • MaxRound
  • RoundTimeoutInMs
var PlayerServiceUploadParamtersArgs_Arguments_DEFAULT *Args_

func NewArgs_

func NewArgs_() *Args_

func (*Args_) GetFlagScore

func (p *Args_) GetFlagScore() int32

func (*Args_) GetMaxRound

func (p *Args_) GetMaxRound() int32

func (*Args_) GetRoundTimeoutInMs

func (p *Args_) GetRoundTimeoutInMs() int32

func (*Args_) GetShellSpeed

func (p *Args_) GetShellSpeed() int32

func (*Args_) GetTankHP

func (p *Args_) GetTankHP() int32

func (*Args_) GetTankScore

func (p *Args_) GetTankScore() int32

func (*Args_) GetTankSpeed

func (p *Args_) GetTankSpeed() int32

func (*Args_) Read

func (p *Args_) Read(iprot thrift.TProtocol) error

func (*Args_) ReadField1

func (p *Args_) ReadField1(iprot thrift.TProtocol) error

func (*Args_) ReadField2

func (p *Args_) ReadField2(iprot thrift.TProtocol) error

func (*Args_) ReadField3

func (p *Args_) ReadField3(iprot thrift.TProtocol) error

func (*Args_) ReadField4

func (p *Args_) ReadField4(iprot thrift.TProtocol) error

func (*Args_) ReadField5

func (p *Args_) ReadField5(iprot thrift.TProtocol) error

func (*Args_) ReadField6

func (p *Args_) ReadField6(iprot thrift.TProtocol) error

func (*Args_) ReadField7

func (p *Args_) ReadField7(iprot thrift.TProtocol) error

func (*Args_) String

func (p *Args_) String() string

func (*Args_) Write

func (p *Args_) Write(oprot thrift.TProtocol) error

type Direction

type Direction int64
const (
	Direction_UP    Direction = 1
	Direction_DOWN  Direction = 2
	Direction_LEFT  Direction = 3
	Direction_RIGHT Direction = 4
)

func DirectionFromString

func DirectionFromString(s string) (Direction, error)

func DirectionPtr

func DirectionPtr(v Direction) *Direction

func (Direction) MarshalText

func (p Direction) MarshalText() ([]byte, error)

func (*Direction) Scan

func (p *Direction) Scan(value interface{}) error

func (Direction) String

func (p Direction) String() string

func (*Direction) UnmarshalText

func (p *Direction) UnmarshalText(text []byte) error

func (*Direction) Value

func (p *Direction) Value() (driver.Value, error)

type GameState

type GameState struct {
	Tanks       []*Tank   `thrift:"tanks,1" db:"tanks" json:"tanks"`
	Shells      []*Shell  `thrift:"shells,2" db:"shells" json:"shells"`
	YourFlagNo  int32     `thrift:"yourFlagNo,3" db:"yourFlagNo" json:"yourFlagNo"`
	EnemyFlagNo int32     `thrift:"enemyFlagNo,4" db:"enemyFlagNo" json:"enemyFlagNo"`
	FlagPos     *Position `thrift:"flagPos,5" db:"flagPos" json:"flagPos,omitempty"`
}

Attributes:

  • Tanks
  • Shells
  • YourFlagNo
  • EnemyFlagNo
  • FlagPos
var PlayerServiceLatestStateArgs_State_DEFAULT *GameState

func NewGameState

func NewGameState() *GameState

func (*GameState) GetEnemyFlagNo

func (p *GameState) GetEnemyFlagNo() int32

func (*GameState) GetFlagPos

func (p *GameState) GetFlagPos() *Position

func (*GameState) GetShells

func (p *GameState) GetShells() []*Shell

func (*GameState) GetTanks

func (p *GameState) GetTanks() []*Tank

func (*GameState) GetYourFlagNo

func (p *GameState) GetYourFlagNo() int32

func (*GameState) IsSetFlagPos

func (p *GameState) IsSetFlagPos() bool

func (*GameState) Read

func (p *GameState) Read(iprot thrift.TProtocol) error

func (*GameState) ReadField1

func (p *GameState) ReadField1(iprot thrift.TProtocol) error

func (*GameState) ReadField2

func (p *GameState) ReadField2(iprot thrift.TProtocol) error

func (*GameState) ReadField3

func (p *GameState) ReadField3(iprot thrift.TProtocol) error

func (*GameState) ReadField4

func (p *GameState) ReadField4(iprot thrift.TProtocol) error

func (*GameState) ReadField5

func (p *GameState) ReadField5(iprot thrift.TProtocol) error

func (*GameState) String

func (p *GameState) String() string

func (*GameState) Write

func (p *GameState) Write(oprot thrift.TProtocol) error

type Order

type Order struct {
	TankId int32     `thrift:"tankId,1" db:"tankId" json:"tankId"`
	Order  string    `thrift:"order,2" db:"order" json:"order"`
	Dir    Direction `thrift:"dir,3" db:"dir" json:"dir"`
}

Attributes:

  • TankId: DO NOT try to send a order with competitor's tank id.

In that case, game engine will treat it as cheat and would ignore ALL this player's orders in this round.

  • Order: Possible orders are: turnTo, fire, move. All others words are illegal and will be ignored.

If want a tank to stick around, just do NOT send any order with that tank.

  • Dir: the dir are always on base of the map instead of the tank itself,

which mean if a 'fire' order with UP direction will made the tank fire a shell toward the UP diction of the map.

Only move order does not need a direction, in that case just give a direction and game engine will ignore it.

func NewOrder

func NewOrder() *Order

func (*Order) GetDir

func (p *Order) GetDir() Direction

func (*Order) GetOrder

func (p *Order) GetOrder() string

func (*Order) GetTankId

func (p *Order) GetTankId() int32

func (*Order) Read

func (p *Order) Read(iprot thrift.TProtocol) error

func (*Order) ReadField1

func (p *Order) ReadField1(iprot thrift.TProtocol) error

func (*Order) ReadField2

func (p *Order) ReadField2(iprot thrift.TProtocol) error

func (*Order) ReadField3

func (p *Order) ReadField3(iprot thrift.TProtocol) error

func (*Order) String

func (p *Order) String() string

func (*Order) Write

func (p *Order) Write(oprot thrift.TProtocol) error

type PlayerErrorCode

type PlayerErrorCode int64

Exceptions

const (
	PlayerErrorCode_UNKNOWN_ERROR  PlayerErrorCode = 0
	PlayerErrorCode_DATABASE_ERROR PlayerErrorCode = 1
	PlayerErrorCode_TOO_BUSY_ERROR PlayerErrorCode = 2
)

func PlayerErrorCodeFromString

func PlayerErrorCodeFromString(s string) (PlayerErrorCode, error)

func PlayerErrorCodePtr

func PlayerErrorCodePtr(v PlayerErrorCode) *PlayerErrorCode

func (PlayerErrorCode) MarshalText

func (p PlayerErrorCode) MarshalText() ([]byte, error)

func (*PlayerErrorCode) Scan

func (p *PlayerErrorCode) Scan(value interface{}) error

func (PlayerErrorCode) String

func (p PlayerErrorCode) String() string

func (*PlayerErrorCode) UnmarshalText

func (p *PlayerErrorCode) UnmarshalText(text []byte) error

func (*PlayerErrorCode) Value

func (p *PlayerErrorCode) Value() (driver.Value, error)

type PlayerService

type PlayerService interface {
	Ping() (r bool, err error)
	// Upload the map to player.
	// The map is made of two-dimesional array of integer. The first dimension means row of the map. The second dimension means column of the map.
	//
	// For example, if N is the map size, position(0,0) means upper left corner, position(0,N) means the upper right corner.
	// In the map array, 0 means empty field, 1 means barrier, 2 means woods, 3 means flag.
	//
	//
	// Parameters:
	//  - Gamemap
	UploadMap(gamemap [][]int32) (err error)
	// Parameters:
	//  - Arguments
	UploadParamters(arguments *Args_) (err error)
	// Assign a list of tank id to the player.
	// each player may have more than one tank, so the parameter is a list.
	//
	//
	// Parameters:
	//  - Tanks
	AssignTanks(tanks []int32) (err error)
	// Report latest game state to player.
	//
	//
	// Parameters:
	//  - State
	LatestState(state *GameState) (err error)
	// Ask for the tank orders for this round.
	// If this funtion does not return orders within the given round timeout, game engine will make all this player's tank to stick around.
	GetNewOrders() (r []*Order, err error)
}

type PlayerServiceAssignTanksArgs

type PlayerServiceAssignTanksArgs struct {
	Tanks []int32 `thrift:"tanks,1" db:"tanks" json:"tanks"`
}

Attributes:

  • Tanks

func NewPlayerServiceAssignTanksArgs

func NewPlayerServiceAssignTanksArgs() *PlayerServiceAssignTanksArgs

func (*PlayerServiceAssignTanksArgs) GetTanks

func (p *PlayerServiceAssignTanksArgs) GetTanks() []int32

func (*PlayerServiceAssignTanksArgs) Read

func (*PlayerServiceAssignTanksArgs) ReadField1

func (p *PlayerServiceAssignTanksArgs) ReadField1(iprot thrift.TProtocol) error

func (*PlayerServiceAssignTanksArgs) String

func (*PlayerServiceAssignTanksArgs) Write

type PlayerServiceAssignTanksResult

type PlayerServiceAssignTanksResult struct {
}

func NewPlayerServiceAssignTanksResult

func NewPlayerServiceAssignTanksResult() *PlayerServiceAssignTanksResult

func (*PlayerServiceAssignTanksResult) Read

func (*PlayerServiceAssignTanksResult) String

func (*PlayerServiceAssignTanksResult) Write

type PlayerServiceClient

type PlayerServiceClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

API

func NewPlayerServiceClientProtocol

func NewPlayerServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *PlayerServiceClient

func (*PlayerServiceClient) AssignTanks

func (p *PlayerServiceClient) AssignTanks(tanks []int32) (err error)

Assign a list of tank id to the player. each player may have more than one tank, so the parameter is a list.

Parameters:

  • Tanks

func (*PlayerServiceClient) GetNewOrders

func (p *PlayerServiceClient) GetNewOrders() (r []*Order, err error)

Ask for the tank orders for this round. If this funtion does not return orders within the given round timeout, game engine will make all this player's tank to stick around.

func (*PlayerServiceClient) LatestState

func (p *PlayerServiceClient) LatestState(state *GameState) (err error)

Report latest game state to player.

Parameters:

  • State

func (*PlayerServiceClient) Ping

func (p *PlayerServiceClient) Ping() (r bool, err error)

func (*PlayerServiceClient) UploadMap

func (p *PlayerServiceClient) UploadMap(gamemap [][]int32) (err error)

Upload the map to player. The map is made of two-dimesional array of integer. The first dimension means row of the map. The second dimension means column of the map.

For example, if N is the map size, position(0,0) means upper left corner, position(0,N) means the upper right corner. In the map array, 0 means empty field, 1 means barrier, 2 means woods, 3 means flag.

Parameters:

  • Gamemap

func (*PlayerServiceClient) UploadParamters

func (p *PlayerServiceClient) UploadParamters(arguments *Args_) (err error)

Parameters:

  • Arguments

type PlayerServiceGetNewOrdersArgs

type PlayerServiceGetNewOrdersArgs struct {
}

func NewPlayerServiceGetNewOrdersArgs

func NewPlayerServiceGetNewOrdersArgs() *PlayerServiceGetNewOrdersArgs

func (*PlayerServiceGetNewOrdersArgs) Read

func (*PlayerServiceGetNewOrdersArgs) String

func (*PlayerServiceGetNewOrdersArgs) Write

type PlayerServiceGetNewOrdersResult

type PlayerServiceGetNewOrdersResult struct {
	Success []*Order `thrift:"success,0" db:"success" json:"success,omitempty"`
}

Attributes:

  • Success

func NewPlayerServiceGetNewOrdersResult

func NewPlayerServiceGetNewOrdersResult() *PlayerServiceGetNewOrdersResult

func (*PlayerServiceGetNewOrdersResult) GetSuccess

func (p *PlayerServiceGetNewOrdersResult) GetSuccess() []*Order

func (*PlayerServiceGetNewOrdersResult) IsSetSuccess

func (p *PlayerServiceGetNewOrdersResult) IsSetSuccess() bool

func (*PlayerServiceGetNewOrdersResult) Read

func (*PlayerServiceGetNewOrdersResult) ReadField0

func (*PlayerServiceGetNewOrdersResult) String

func (*PlayerServiceGetNewOrdersResult) Write

type PlayerServiceLatestStateArgs

type PlayerServiceLatestStateArgs struct {
	State *GameState `thrift:"state,1" db:"state" json:"state"`
}

Attributes:

  • State

func NewPlayerServiceLatestStateArgs

func NewPlayerServiceLatestStateArgs() *PlayerServiceLatestStateArgs

func (*PlayerServiceLatestStateArgs) GetState

func (p *PlayerServiceLatestStateArgs) GetState() *GameState

func (*PlayerServiceLatestStateArgs) IsSetState

func (p *PlayerServiceLatestStateArgs) IsSetState() bool

func (*PlayerServiceLatestStateArgs) Read

func (*PlayerServiceLatestStateArgs) ReadField1

func (p *PlayerServiceLatestStateArgs) ReadField1(iprot thrift.TProtocol) error

func (*PlayerServiceLatestStateArgs) String

func (*PlayerServiceLatestStateArgs) Write

type PlayerServiceLatestStateResult

type PlayerServiceLatestStateResult struct {
}

func NewPlayerServiceLatestStateResult

func NewPlayerServiceLatestStateResult() *PlayerServiceLatestStateResult

func (*PlayerServiceLatestStateResult) Read

func (*PlayerServiceLatestStateResult) String

func (*PlayerServiceLatestStateResult) Write

type PlayerServicePingArgs

type PlayerServicePingArgs struct {
}

func NewPlayerServicePingArgs

func NewPlayerServicePingArgs() *PlayerServicePingArgs

func (*PlayerServicePingArgs) Read

func (*PlayerServicePingArgs) String

func (p *PlayerServicePingArgs) String() string

func (*PlayerServicePingArgs) Write

func (p *PlayerServicePingArgs) Write(oprot thrift.TProtocol) error

type PlayerServicePingResult

type PlayerServicePingResult struct {
	Success          *bool                   `thrift:"success,0" db:"success" json:"success,omitempty"`
	UserException    *PlayerUserException    `thrift:"user_exception,1" db:"user_exception" json:"user_exception,omitempty"`
	SystemException  *PlayerSystemException  `thrift:"system_exception,2" db:"system_exception" json:"system_exception,omitempty"`
	UnknownException *PlayerUnknownException `thrift:"unknown_exception,3" db:"unknown_exception" json:"unknown_exception,omitempty"`
}

Attributes:

  • Success
  • UserException
  • SystemException
  • UnknownException

func NewPlayerServicePingResult

func NewPlayerServicePingResult() *PlayerServicePingResult

func (*PlayerServicePingResult) GetSuccess

func (p *PlayerServicePingResult) GetSuccess() bool

func (*PlayerServicePingResult) GetSystemException

func (p *PlayerServicePingResult) GetSystemException() *PlayerSystemException

func (*PlayerServicePingResult) GetUnknownException

func (p *PlayerServicePingResult) GetUnknownException() *PlayerUnknownException

func (*PlayerServicePingResult) GetUserException

func (p *PlayerServicePingResult) GetUserException() *PlayerUserException

func (*PlayerServicePingResult) IsSetSuccess

func (p *PlayerServicePingResult) IsSetSuccess() bool

func (*PlayerServicePingResult) IsSetSystemException

func (p *PlayerServicePingResult) IsSetSystemException() bool

func (*PlayerServicePingResult) IsSetUnknownException

func (p *PlayerServicePingResult) IsSetUnknownException() bool

func (*PlayerServicePingResult) IsSetUserException

func (p *PlayerServicePingResult) IsSetUserException() bool

func (*PlayerServicePingResult) Read

func (*PlayerServicePingResult) ReadField0

func (p *PlayerServicePingResult) ReadField0(iprot thrift.TProtocol) error

func (*PlayerServicePingResult) ReadField1

func (p *PlayerServicePingResult) ReadField1(iprot thrift.TProtocol) error

func (*PlayerServicePingResult) ReadField2

func (p *PlayerServicePingResult) ReadField2(iprot thrift.TProtocol) error

func (*PlayerServicePingResult) ReadField3

func (p *PlayerServicePingResult) ReadField3(iprot thrift.TProtocol) error

func (*PlayerServicePingResult) String

func (p *PlayerServicePingResult) String() string

func (*PlayerServicePingResult) Write

type PlayerServiceProcessor

type PlayerServiceProcessor struct {
	// contains filtered or unexported fields
}

func NewPlayerServiceProcessor

func NewPlayerServiceProcessor(handler PlayerService) *PlayerServiceProcessor

func (*PlayerServiceProcessor) AddToProcessorMap

func (p *PlayerServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*PlayerServiceProcessor) GetProcessorFunction

func (p *PlayerServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*PlayerServiceProcessor) Process

func (p *PlayerServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*PlayerServiceProcessor) ProcessorMap

type PlayerServiceUploadMapArgs

type PlayerServiceUploadMapArgs struct {
	Gamemap [][]int32 `thrift:"gamemap,1" db:"gamemap" json:"gamemap"`
}

Attributes:

  • Gamemap

func NewPlayerServiceUploadMapArgs

func NewPlayerServiceUploadMapArgs() *PlayerServiceUploadMapArgs

func (*PlayerServiceUploadMapArgs) GetGamemap

func (p *PlayerServiceUploadMapArgs) GetGamemap() [][]int32

func (*PlayerServiceUploadMapArgs) Read

func (*PlayerServiceUploadMapArgs) ReadField1

func (p *PlayerServiceUploadMapArgs) ReadField1(iprot thrift.TProtocol) error

func (*PlayerServiceUploadMapArgs) String

func (p *PlayerServiceUploadMapArgs) String() string

func (*PlayerServiceUploadMapArgs) Write

type PlayerServiceUploadMapResult

type PlayerServiceUploadMapResult struct {
}

func NewPlayerServiceUploadMapResult

func NewPlayerServiceUploadMapResult() *PlayerServiceUploadMapResult

func (*PlayerServiceUploadMapResult) Read

func (*PlayerServiceUploadMapResult) String

func (*PlayerServiceUploadMapResult) Write

type PlayerServiceUploadParamtersArgs

type PlayerServiceUploadParamtersArgs struct {
	Arguments *Args_ `thrift:"arguments,1" db:"arguments" json:"arguments"`
}

Attributes:

  • Arguments

func NewPlayerServiceUploadParamtersArgs

func NewPlayerServiceUploadParamtersArgs() *PlayerServiceUploadParamtersArgs

func (*PlayerServiceUploadParamtersArgs) GetArguments

func (p *PlayerServiceUploadParamtersArgs) GetArguments() *Args_

func (*PlayerServiceUploadParamtersArgs) IsSetArguments

func (p *PlayerServiceUploadParamtersArgs) IsSetArguments() bool

func (*PlayerServiceUploadParamtersArgs) Read

func (*PlayerServiceUploadParamtersArgs) ReadField1

func (*PlayerServiceUploadParamtersArgs) String

func (*PlayerServiceUploadParamtersArgs) Write

type PlayerServiceUploadParamtersResult

type PlayerServiceUploadParamtersResult struct {
}

func NewPlayerServiceUploadParamtersResult

func NewPlayerServiceUploadParamtersResult() *PlayerServiceUploadParamtersResult

func (*PlayerServiceUploadParamtersResult) Read

func (*PlayerServiceUploadParamtersResult) String

func (*PlayerServiceUploadParamtersResult) Write

type PlayerSystemException

type PlayerSystemException struct {
	ErrorCode PlayerErrorCode `thrift:"error_code,1,required" db:"error_code" json:"error_code"`
	ErrorName string          `thrift:"error_name,2,required" db:"error_name" json:"error_name"`
	Message   *string         `thrift:"message,3" db:"message" json:"message,omitempty"`
}

Attributes:

  • ErrorCode
  • ErrorName
  • Message
var PlayerServicePingResult_SystemException_DEFAULT *PlayerSystemException

func NewPlayerSystemException

func NewPlayerSystemException() *PlayerSystemException

func (*PlayerSystemException) Error

func (p *PlayerSystemException) Error() string

func (*PlayerSystemException) GetErrorCode

func (p *PlayerSystemException) GetErrorCode() PlayerErrorCode

func (*PlayerSystemException) GetErrorName

func (p *PlayerSystemException) GetErrorName() string

func (*PlayerSystemException) GetMessage

func (p *PlayerSystemException) GetMessage() string

func (*PlayerSystemException) IsSetMessage

func (p *PlayerSystemException) IsSetMessage() bool

func (*PlayerSystemException) Read

func (*PlayerSystemException) ReadField1

func (p *PlayerSystemException) ReadField1(iprot thrift.TProtocol) error

func (*PlayerSystemException) ReadField2

func (p *PlayerSystemException) ReadField2(iprot thrift.TProtocol) error

func (*PlayerSystemException) ReadField3

func (p *PlayerSystemException) ReadField3(iprot thrift.TProtocol) error

func (*PlayerSystemException) String

func (p *PlayerSystemException) String() string

func (*PlayerSystemException) Write

func (p *PlayerSystemException) Write(oprot thrift.TProtocol) error

type PlayerUnknownException

type PlayerUnknownException struct {
	ErrorCode PlayerErrorCode `thrift:"error_code,1,required" db:"error_code" json:"error_code"`
	ErrorName string          `thrift:"error_name,2,required" db:"error_name" json:"error_name"`
	Message   string          `thrift:"message,3,required" db:"message" json:"message"`
}

Attributes:

  • ErrorCode
  • ErrorName
  • Message
var PlayerServicePingResult_UnknownException_DEFAULT *PlayerUnknownException

func NewPlayerUnknownException

func NewPlayerUnknownException() *PlayerUnknownException

func (*PlayerUnknownException) Error

func (p *PlayerUnknownException) Error() string

func (*PlayerUnknownException) GetErrorCode

func (p *PlayerUnknownException) GetErrorCode() PlayerErrorCode

func (*PlayerUnknownException) GetErrorName

func (p *PlayerUnknownException) GetErrorName() string

func (*PlayerUnknownException) GetMessage

func (p *PlayerUnknownException) GetMessage() string

func (*PlayerUnknownException) Read

func (*PlayerUnknownException) ReadField1

func (p *PlayerUnknownException) ReadField1(iprot thrift.TProtocol) error

func (*PlayerUnknownException) ReadField2

func (p *PlayerUnknownException) ReadField2(iprot thrift.TProtocol) error

func (*PlayerUnknownException) ReadField3

func (p *PlayerUnknownException) ReadField3(iprot thrift.TProtocol) error

func (*PlayerUnknownException) String

func (p *PlayerUnknownException) String() string

func (*PlayerUnknownException) Write

func (p *PlayerUnknownException) Write(oprot thrift.TProtocol) error

type PlayerUserException

type PlayerUserException struct {
	ErrorCode PlayerErrorCode `thrift:"error_code,1,required" db:"error_code" json:"error_code"`
	ErrorName string          `thrift:"error_name,2,required" db:"error_name" json:"error_name"`
	Message   *string         `thrift:"message,3" db:"message" json:"message,omitempty"`
}

Attributes:

  • ErrorCode
  • ErrorName
  • Message
var PlayerServicePingResult_UserException_DEFAULT *PlayerUserException

func NewPlayerUserException

func NewPlayerUserException() *PlayerUserException

func (*PlayerUserException) Error

func (p *PlayerUserException) Error() string

func (*PlayerUserException) GetErrorCode

func (p *PlayerUserException) GetErrorCode() PlayerErrorCode

func (*PlayerUserException) GetErrorName

func (p *PlayerUserException) GetErrorName() string

func (*PlayerUserException) GetMessage

func (p *PlayerUserException) GetMessage() string

func (*PlayerUserException) IsSetMessage

func (p *PlayerUserException) IsSetMessage() bool

func (*PlayerUserException) Read

func (p *PlayerUserException) Read(iprot thrift.TProtocol) error

func (*PlayerUserException) ReadField1

func (p *PlayerUserException) ReadField1(iprot thrift.TProtocol) error

func (*PlayerUserException) ReadField2

func (p *PlayerUserException) ReadField2(iprot thrift.TProtocol) error

func (*PlayerUserException) ReadField3

func (p *PlayerUserException) ReadField3(iprot thrift.TProtocol) error

func (*PlayerUserException) String

func (p *PlayerUserException) String() string

func (*PlayerUserException) Write

func (p *PlayerUserException) Write(oprot thrift.TProtocol) error

type Position

type Position struct {
	X int32 `thrift:"x,1" db:"x" json:"x"`
	Y int32 `thrift:"y,2" db:"y" json:"y"`
}

Types and Structures

Attributes:

  • X
  • Y
var GameState_FlagPos_DEFAULT *Position
var Shell_Pos_DEFAULT *Position
var Tank_Pos_DEFAULT *Position

func NewPosition

func NewPosition() *Position

func (*Position) GetX

func (p *Position) GetX() int32

func (*Position) GetY

func (p *Position) GetY() int32

func (*Position) Read

func (p *Position) Read(iprot thrift.TProtocol) error

func (*Position) ReadField1

func (p *Position) ReadField1(iprot thrift.TProtocol) error

func (*Position) ReadField2

func (p *Position) ReadField2(iprot thrift.TProtocol) error

func (*Position) String

func (p *Position) String() string

func (*Position) Write

func (p *Position) Write(oprot thrift.TProtocol) error

type Shell

type Shell struct {
	ID  int32     `thrift:"id,1" db:"id" json:"id"`
	Pos *Position `thrift:"pos,2" db:"pos" json:"pos"`
	Dir Direction `thrift:"dir,3" db:"dir" json:"dir"`
}

Attributes:

  • ID
  • Pos
  • Dir

func NewShell

func NewShell() *Shell

func (*Shell) GetDir

func (p *Shell) GetDir() Direction

func (*Shell) GetID

func (p *Shell) GetID() int32

func (*Shell) GetPos

func (p *Shell) GetPos() *Position

func (*Shell) IsSetPos

func (p *Shell) IsSetPos() bool

func (*Shell) Read

func (p *Shell) Read(iprot thrift.TProtocol) error

func (*Shell) ReadField1

func (p *Shell) ReadField1(iprot thrift.TProtocol) error

func (*Shell) ReadField2

func (p *Shell) ReadField2(iprot thrift.TProtocol) error

func (*Shell) ReadField3

func (p *Shell) ReadField3(iprot thrift.TProtocol) error

func (*Shell) String

func (p *Shell) String() string

func (*Shell) Write

func (p *Shell) Write(oprot thrift.TProtocol) error

type Tank

type Tank struct {
	ID  int32     `thrift:"id,1" db:"id" json:"id"`
	Pos *Position `thrift:"pos,2" db:"pos" json:"pos"`
	Dir Direction `thrift:"dir,3" db:"dir" json:"dir"`
	Hp  int32     `thrift:"hp,4" db:"hp" json:"hp"`
}

Attributes:

  • ID
  • Pos
  • Dir
  • Hp

func NewTank

func NewTank() *Tank

func (*Tank) GetDir

func (p *Tank) GetDir() Direction

func (*Tank) GetHp

func (p *Tank) GetHp() int32

func (*Tank) GetID

func (p *Tank) GetID() int32

func (*Tank) GetPos

func (p *Tank) GetPos() *Position

func (*Tank) IsSetPos

func (p *Tank) IsSetPos() bool

func (*Tank) Read

func (p *Tank) Read(iprot thrift.TProtocol) error

func (*Tank) ReadField1

func (p *Tank) ReadField1(iprot thrift.TProtocol) error

func (*Tank) ReadField2

func (p *Tank) ReadField2(iprot thrift.TProtocol) error

func (*Tank) ReadField3

func (p *Tank) ReadField3(iprot thrift.TProtocol) error

func (*Tank) ReadField4

func (p *Tank) ReadField4(iprot thrift.TProtocol) error

func (*Tank) String

func (p *Tank) String() string

func (*Tank) Write

func (p *Tank) Write(oprot thrift.TProtocol) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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