log

package
v0.0.0-...-7f16e2a Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Furiten_name = map[int32]string{
		0: "FURITEN_UNDEFINED",
		1: "FURITEN_NO",
		2: "FURITEN_YES",
	}
	Furiten_value = map[string]int32{
		"FURITEN_UNDEFINED": 0,
		"FURITEN_NO":        1,
		"FURITEN_YES":       2,
	}
)

Enum value maps for Furiten.

View Source
var (
	Say_name = map[int32]string{
		0: "SAY_UNSPECIFIED",
		1: "RIICHI",
		2: "RON",
		3: "TSUMO",
		4: "DRAW",
		5: "KAN",
		6: "PON",
		7: "CHI",
		8: "TEMPAI",
		9: "NOTEN",
	}
	Say_value = map[string]int32{
		"SAY_UNSPECIFIED": 0,
		"RIICHI":          1,
		"RON":             2,
		"TSUMO":           3,
		"DRAW":            4,
		"KAN":             5,
		"PON":             6,
		"CHI":             7,
		"TEMPAI":          8,
		"NOTEN":           9,
	}
)

Enum value maps for Say.

View Source
var (
	DrawReason_name = map[int32]string{
		0: "DRAW_UNSPECIFIED",
		1: "REGULAR",
		2: "NAGASHI",
		3: "WINDS",
		4: "KOKUSHI",
		5: "RIICHI4",
		6: "RON3",
		7: "KAN4",
	}
	DrawReason_value = map[string]int32{
		"DRAW_UNSPECIFIED": 0,
		"REGULAR":          1,
		"NAGASHI":          2,
		"WINDS":            3,
		"KOKUSHI":          4,
		"RIICHI4":          5,
		"RON3":             6,
		"KAN4":             7,
	}
)

Enum value maps for DrawReason.

View Source
var (
	PlayerStauts_name = map[int32]string{
		0: "STATUS_UNDEFINED",
		1: "OFFLINE",
		2: "ONLINE",
	}
	PlayerStauts_value = map[string]int32{
		"STATUS_UNDEFINED": 0,
		"OFFLINE":          1,
		"ONLINE":           2,
	}
)

Enum value maps for PlayerStauts.

View Source
var (
	GameEndReason_name = map[int32]string{
		0: "GAME_END_REASON_UNSPECIFIED",
		1: "NORMAL",
		2: "BANCROCITY",
		3: "MAX_WIND",
		4: "AGARI_YAME",
		5: "TIMEOUT",
	}
	GameEndReason_value = map[string]int32{
		"GAME_END_REASON_UNSPECIFIED": 0,
		"NORMAL":                      1,
		"BANCROCITY":                  2,
		"MAX_WIND":                    3,
		"AGARI_YAME":                  4,
		"TIMEOUT":                     5,
	}
)

Enum value maps for GameEndReason.

View Source
var (
	RoundEndReason_name = map[int32]string{
		0: "Round_END_REASON_UNSPECIFIED",
		1: "REASON_RON",
		2: "REASON_TSUMO",
		3: "REASON_REGULAR_DRAW",
		4: "REASON_DRAW",
	}
	RoundEndReason_value = map[string]int32{
		"Round_END_REASON_UNSPECIFIED": 0,
		"REASON_RON":                   1,
		"REASON_TSUMO":                 2,
		"REASON_REGULAR_DRAW":          3,
		"REASON_DRAW":                  4,
	}
)

Enum value maps for RoundEndReason.

View Source
var File_public_log_common_proto protoreflect.FileDescriptor
View Source
var File_public_log_events_proto protoreflect.FileDescriptor
View Source
var File_public_log_log_proto protoreflect.FileDescriptor
View Source
var File_public_log_log_service_proto protoreflect.FileDescriptor

Functions

func RegisterLogServiceServer

func RegisterLogServiceServer(s *grpc.Server, srv LogServiceServer)

Types

type Changes

type Changes struct {
	Changes []int64 `protobuf:"zigzag64,1,rep,packed,name=changes,proto3" json:"changes,omitempty"`
	// After changes applied
	Results []int64 `protobuf:"zigzag64,2,rep,packed,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

Represents score changing.

func (*Changes) Descriptor deprecated

func (*Changes) Descriptor() ([]byte, []int)

Deprecated: Use Changes.ProtoReflect.Descriptor instead.

func (*Changes) GetChanges

func (x *Changes) GetChanges() []int64

func (*Changes) GetResults

func (x *Changes) GetResults() []int64

func (*Changes) ProtoMessage

func (*Changes) ProtoMessage()

func (*Changes) ProtoReflect

func (x *Changes) ProtoReflect() protoreflect.Message

func (*Changes) Reset

func (x *Changes) Reset()

func (*Changes) String

func (x *Changes) String() string

type DeclareEvent

type DeclareEvent struct {
	WhoIndex int64      `protobuf:"varint,1,opt,name=who_index,json=whoIndex,proto3" json:"who_index,omitempty"`
	Meld     *base.Meld `protobuf:"bytes,2,opt,name=meld,proto3" json:"meld,omitempty"`
	// contains filtered or unexported fields
}

func (*DeclareEvent) Descriptor deprecated

func (*DeclareEvent) Descriptor() ([]byte, []int)

Deprecated: Use DeclareEvent.ProtoReflect.Descriptor instead.

func (*DeclareEvent) GetMeld

func (x *DeclareEvent) GetMeld() *base.Meld

func (*DeclareEvent) GetWhoIndex

func (x *DeclareEvent) GetWhoIndex() int64

func (*DeclareEvent) ProtoMessage

func (*DeclareEvent) ProtoMessage()

func (*DeclareEvent) ProtoReflect

func (x *DeclareEvent) ProtoReflect() protoreflect.Message

func (*DeclareEvent) Reset

func (x *DeclareEvent) Reset()

func (*DeclareEvent) String

func (x *DeclareEvent) String() string

type DrawEvent

type DrawEvent struct {

	// Visible hands of players.
	// For kusukuhai and tempai.
	Hands   []*base.Instances `protobuf:"bytes,1,rep,name=hands,proto3" json:"hands,omitempty"`
	Reason  DrawReason        `protobuf:"varint,2,opt,name=reason,proto3,enum=mahjong.log.DrawReason" json:"reason,omitempty"`
	Changes *Changes          `protobuf:"bytes,3,opt,name=changes,proto3" json:"changes,omitempty"`
	// contains filtered or unexported fields
}

func (*DrawEvent) Descriptor deprecated

func (*DrawEvent) Descriptor() ([]byte, []int)

Deprecated: Use DrawEvent.ProtoReflect.Descriptor instead.

func (*DrawEvent) GetChanges

func (x *DrawEvent) GetChanges() *Changes

func (*DrawEvent) GetHands

func (x *DrawEvent) GetHands() []*base.Instances

func (*DrawEvent) GetReason

func (x *DrawEvent) GetReason() DrawReason

func (*DrawEvent) ProtoMessage

func (*DrawEvent) ProtoMessage()

func (*DrawEvent) ProtoReflect

func (x *DrawEvent) ProtoReflect() protoreflect.Message

func (*DrawEvent) Reset

func (x *DrawEvent) Reset()

func (*DrawEvent) String

func (x *DrawEvent) String() string

type DrawReason

type DrawReason int32
const (
	DrawReason_DRAW_UNSPECIFIED DrawReason = 0
	// Regular draw.
	DrawReason_REGULAR DrawReason = 1
	// Special discared at regular draw.
	DrawReason_NAGASHI DrawReason = 2
	// For winds first drop.
	DrawReason_WINDS DrawReason = 3
	// 9 different koksuhi tiles from start.
	DrawReason_KOKUSHI DrawReason = 4
	// 4 riichi declared.
	DrawReason_RIICHI4 DrawReason = 5
	// Ron from three players at a time.
	DrawReason_RON3 DrawReason = 6
	// For kans by different players declared.
	DrawReason_KAN4 DrawReason = 7
)

func (DrawReason) Descriptor

func (DrawReason) Descriptor() protoreflect.EnumDescriptor

func (DrawReason) Enum

func (x DrawReason) Enum() *DrawReason

func (DrawReason) EnumDescriptor deprecated

func (DrawReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use DrawReason.Descriptor instead.

func (DrawReason) Number

func (x DrawReason) Number() protoreflect.EnumNumber

func (DrawReason) String

func (x DrawReason) String() string

func (DrawReason) Type

type DropEvent

type DropEvent struct {
	WhoIndex  int64 `protobuf:"varint,1,opt,name=who_index,json=whoIndex,proto3" json:"who_index,omitempty"`
	Instance  int64 `protobuf:"varint,2,opt,name=instance,proto3" json:"instance,omitempty"`
	Tsumogiri bool  `protobuf:"varint,3,opt,name=tsumogiri,proto3" json:"tsumogiri,omitempty"`
	Riichi    bool  `protobuf:"varint,4,opt,name=riichi,proto3" json:"riichi,omitempty"`
	// Filled only when tempai.
	// Will be filled only for self, when in game.
	// Will be filled in logs.
	// Not filled for other players in game.
	WaitTiles int64 `protobuf:"varint,5,opt,name=wait_tiles,json=waitTiles,proto3" json:"wait_tiles,omitempty"`
	// contains filtered or unexported fields
}

func (*DropEvent) Descriptor deprecated

func (*DropEvent) Descriptor() ([]byte, []int)

Deprecated: Use DropEvent.ProtoReflect.Descriptor instead.

func (*DropEvent) GetInstance

func (x *DropEvent) GetInstance() int64

func (*DropEvent) GetRiichi

func (x *DropEvent) GetRiichi() bool

func (*DropEvent) GetTsumogiri

func (x *DropEvent) GetTsumogiri() bool

func (*DropEvent) GetWaitTiles

func (x *DropEvent) GetWaitTiles() int64

func (*DropEvent) GetWhoIndex

func (x *DropEvent) GetWhoIndex() int64

func (*DropEvent) ProtoMessage

func (*DropEvent) ProtoMessage()

func (*DropEvent) ProtoReflect

func (x *DropEvent) ProtoReflect() protoreflect.Message

func (*DropEvent) Reset

func (x *DropEvent) Reset()

func (*DropEvent) String

func (x *DropEvent) String() string

type Event

type Event struct {

	// Id to be used to point to some event in the game.
	EventId int64                `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
	Time    *timestamp.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// Types that are assignable to OneofEvents:
	//
	//	*Event_Take
	//	*Event_Drop
	//	*Event_Changes
	//	*Event_Say
	//	*Event_Declare
	//	*Event_Win
	//	*Event_Draw
	//	*Event_Indicator
	//	*Event_Furiten
	//	*Event_PlayerStatus
	OneofEvents isEvent_OneofEvents `protobuf_oneof:"oneof_events"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetChanges

func (x *Event) GetChanges() *ScoreChangesEvent

func (*Event) GetDeclare

func (x *Event) GetDeclare() *DeclareEvent

func (*Event) GetDraw

func (x *Event) GetDraw() *DrawEvent

func (*Event) GetDrop

func (x *Event) GetDrop() *DropEvent

func (*Event) GetEventId

func (x *Event) GetEventId() int64

func (*Event) GetFuriten

func (x *Event) GetFuriten() *FuritenEvent

func (*Event) GetIndicator

func (x *Event) GetIndicator() *IndicatorEvent

func (*Event) GetOneofEvents

func (m *Event) GetOneofEvents() isEvent_OneofEvents

func (*Event) GetPlayerStatus

func (x *Event) GetPlayerStatus() *PlayerStatusEvent

func (*Event) GetSay

func (x *Event) GetSay() *SayEvent

func (*Event) GetTake

func (x *Event) GetTake() *TakeEvent

func (*Event) GetTime

func (x *Event) GetTime() *timestamp.Timestamp

func (*Event) GetWin

func (x *Event) GetWin() *WinEvent

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type Event_Changes

type Event_Changes struct {
	Changes *ScoreChangesEvent `protobuf:"bytes,5,opt,name=changes,proto3,oneof"`
}

type Event_Declare

type Event_Declare struct {
	Declare *DeclareEvent `protobuf:"bytes,7,opt,name=declare,proto3,oneof"`
}

type Event_Draw

type Event_Draw struct {
	Draw *DrawEvent `protobuf:"bytes,9,opt,name=draw,proto3,oneof"`
}

type Event_Drop

type Event_Drop struct {
	Drop *DropEvent `protobuf:"bytes,4,opt,name=drop,proto3,oneof"`
}

type Event_Furiten

type Event_Furiten struct {
	Furiten *FuritenEvent `protobuf:"bytes,11,opt,name=furiten,proto3,oneof"`
}

type Event_Indicator

type Event_Indicator struct {
	Indicator *IndicatorEvent `protobuf:"bytes,10,opt,name=indicator,proto3,oneof"`
}

type Event_PlayerStatus

type Event_PlayerStatus struct {
	PlayerStatus *PlayerStatusEvent `protobuf:"bytes,12,opt,name=player_status,json=playerStatus,proto3,oneof"`
}

type Event_Say

type Event_Say struct {
	Say *SayEvent `protobuf:"bytes,6,opt,name=say,proto3,oneof"`
}

type Event_Take

type Event_Take struct {
	Take *TakeEvent `protobuf:"bytes,3,opt,name=take,proto3,oneof"`
}

type Event_Win

type Event_Win struct {
	Win *WinEvent `protobuf:"bytes,8,opt,name=win,proto3,oneof"`
}

type Furiten

type Furiten int32
const (
	Furiten_FURITEN_UNDEFINED Furiten = 0
	Furiten_FURITEN_NO        Furiten = 1
	Furiten_FURITEN_YES       Furiten = 2
)

func (Furiten) Descriptor

func (Furiten) Descriptor() protoreflect.EnumDescriptor

func (Furiten) Enum

func (x Furiten) Enum() *Furiten

func (Furiten) EnumDescriptor deprecated

func (Furiten) EnumDescriptor() ([]byte, []int)

Deprecated: Use Furiten.Descriptor instead.

func (Furiten) Number

func (x Furiten) Number() protoreflect.EnumNumber

func (Furiten) String

func (x Furiten) String() string

func (Furiten) Type

func (Furiten) Type() protoreflect.EnumType

type FuritenEvent

type FuritenEvent struct {
	WhoIndex int64   `protobuf:"varint,1,opt,name=who_index,json=whoIndex,proto3" json:"who_index,omitempty"`
	Furiten  Furiten `protobuf:"varint,2,opt,name=furiten,proto3,enum=mahjong.log.Furiten" json:"furiten,omitempty"`
	// contains filtered or unexported fields
}

func (*FuritenEvent) Descriptor deprecated

func (*FuritenEvent) Descriptor() ([]byte, []int)

Deprecated: Use FuritenEvent.ProtoReflect.Descriptor instead.

func (*FuritenEvent) GetFuriten

func (x *FuritenEvent) GetFuriten() Furiten

func (*FuritenEvent) GetWhoIndex

func (x *FuritenEvent) GetWhoIndex() int64

func (*FuritenEvent) ProtoMessage

func (*FuritenEvent) ProtoMessage()

func (*FuritenEvent) ProtoReflect

func (x *FuritenEvent) ProtoReflect() protoreflect.Message

func (*FuritenEvent) Reset

func (x *FuritenEvent) Reset()

func (*FuritenEvent) String

func (x *FuritenEvent) String() string

type GameEndReason

type GameEndReason int32

All game reasons applied if only specified by rules.

const (
	GameEndReason_GAME_END_REASON_UNSPECIFIED GameEndReason = 0
	// All conditions are ok.
	GameEndReason_NORMAL GameEndReason = 1
	// One of players have less than zero points.
	GameEndReason_BANCROCITY GameEndReason = 2
	// Maximum possible wind played with non of player got required points to win.
	GameEndReason_MAX_WIND GameEndReason = 3
	// Dealer is first in orasu.
	GameEndReason_AGARI_YAME GameEndReason = 4
	// For some time-limited tournaments.
	GameEndReason_TIMEOUT GameEndReason = 5
)

func (GameEndReason) Descriptor

func (GameEndReason) Enum

func (x GameEndReason) Enum() *GameEndReason

func (GameEndReason) EnumDescriptor deprecated

func (GameEndReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use GameEndReason.Descriptor instead.

func (GameEndReason) Number

func (GameEndReason) String

func (x GameEndReason) String() string

func (GameEndReason) Type

type GameInfo

type GameInfo struct {
	Id       string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Players  []*Player       `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"`
	Rules    *rules.Ruleset  `protobuf:"bytes,3,opt,name=rules,proto3" json:"rules,omitempty"`
	Timeouts *rules.Timeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"`
	// contains filtered or unexported fields
}

func (*GameInfo) Descriptor deprecated

func (*GameInfo) Descriptor() ([]byte, []int)

Deprecated: Use GameInfo.ProtoReflect.Descriptor instead.

func (*GameInfo) GetId

func (x *GameInfo) GetId() string

func (*GameInfo) GetPlayers

func (x *GameInfo) GetPlayers() []*Player

func (*GameInfo) GetRules

func (x *GameInfo) GetRules() *rules.Ruleset

func (*GameInfo) GetTimeouts

func (x *GameInfo) GetTimeouts() *rules.Timeouts

func (*GameInfo) ProtoMessage

func (*GameInfo) ProtoMessage()

func (*GameInfo) ProtoReflect

func (x *GameInfo) ProtoReflect() protoreflect.Message

func (*GameInfo) Reset

func (x *GameInfo) Reset()

func (*GameInfo) String

func (x *GameInfo) String() string

type GetLogRequest

type GetLogRequest struct {
	LogId string `protobuf:"bytes,1,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLogRequest) Descriptor deprecated

func (*GetLogRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetLogRequest.ProtoReflect.Descriptor instead.

func (*GetLogRequest) GetLogId

func (x *GetLogRequest) GetLogId() string

func (*GetLogRequest) ProtoMessage

func (*GetLogRequest) ProtoMessage()

func (*GetLogRequest) ProtoReflect

func (x *GetLogRequest) ProtoReflect() protoreflect.Message

func (*GetLogRequest) Reset

func (x *GetLogRequest) Reset()

func (*GetLogRequest) String

func (x *GetLogRequest) String() string

type GetLogResponse

type GetLogResponse struct {
	Log *Log `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLogResponse) Descriptor deprecated

func (*GetLogResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetLogResponse.ProtoReflect.Descriptor instead.

func (*GetLogResponse) GetLog

func (x *GetLogResponse) GetLog() *Log

func (*GetLogResponse) ProtoMessage

func (*GetLogResponse) ProtoMessage()

func (*GetLogResponse) ProtoReflect

func (x *GetLogResponse) ProtoReflect() protoreflect.Message

func (*GetLogResponse) Reset

func (x *GetLogResponse) Reset()

func (*GetLogResponse) String

func (x *GetLogResponse) String() string

type IndicatorEvent

type IndicatorEvent struct {
	Instance int64 `protobuf:"varint,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*IndicatorEvent) Descriptor deprecated

func (*IndicatorEvent) Descriptor() ([]byte, []int)

Deprecated: Use IndicatorEvent.ProtoReflect.Descriptor instead.

func (*IndicatorEvent) GetInstance

func (x *IndicatorEvent) GetInstance() int64

func (*IndicatorEvent) ProtoMessage

func (*IndicatorEvent) ProtoMessage()

func (*IndicatorEvent) ProtoReflect

func (x *IndicatorEvent) ProtoReflect() protoreflect.Message

func (*IndicatorEvent) Reset

func (x *IndicatorEvent) Reset()

func (*IndicatorEvent) String

func (x *IndicatorEvent) String() string

type Log

type Log struct {
	Info   *GameInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Rounds []*Round  `protobuf:"bytes,2,rep,name=rounds,proto3" json:"rounds,omitempty"`
	// Uma+Oka changes.
	Changes   *Changes             `protobuf:"bytes,3,opt,name=changes,proto3" json:"changes,omitempty"`
	Started   *timestamp.Timestamp `protobuf:"bytes,4,opt,name=started,proto3" json:"started,omitempty"`
	Ended     *timestamp.Timestamp `protobuf:"bytes,5,opt,name=ended,proto3" json:"ended,omitempty"`
	EndReason GameEndReason        `protobuf:"varint,6,opt,name=end_reason,json=endReason,proto3,enum=mahjong.log.GameEndReason" json:"end_reason,omitempty"`
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

func (*Log) Descriptor() ([]byte, []int)

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetChanges

func (x *Log) GetChanges() *Changes

func (*Log) GetEndReason

func (x *Log) GetEndReason() GameEndReason

func (*Log) GetEnded

func (x *Log) GetEnded() *timestamp.Timestamp

func (*Log) GetInfo

func (x *Log) GetInfo() *GameInfo

func (*Log) GetRounds

func (x *Log) GetRounds() []*Round

func (*Log) GetStarted

func (x *Log) GetStarted() *timestamp.Timestamp

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

func (x *Log) ProtoReflect() protoreflect.Message

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type LogServiceClient

type LogServiceClient interface {
	GetLog(ctx context.Context, in *GetLogRequest, opts ...grpc.CallOption) (*GetLogResponse, error)
}

LogServiceClient is the client API for LogService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewLogServiceClient

func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient

type LogServiceServer

type LogServiceServer interface {
	GetLog(context.Context, *GetLogRequest) (*GetLogResponse, error)
}

LogServiceServer is the server API for LogService service.

type Player

type Player struct {

	// Player name, visible at the client.
	Caption string `protobuf:"bytes,1,opt,name=caption,proto3" json:"caption,omitempty"`
	// contains filtered or unexported fields
}

func (*Player) Descriptor deprecated

func (*Player) Descriptor() ([]byte, []int)

Deprecated: Use Player.ProtoReflect.Descriptor instead.

func (*Player) GetCaption

func (x *Player) GetCaption() string

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) ProtoReflect

func (x *Player) ProtoReflect() protoreflect.Message

func (*Player) Reset

func (x *Player) Reset()

func (*Player) String

func (x *Player) String() string

type PlayerStatusEvent

type PlayerStatusEvent struct {
	WhoIndex int64        `protobuf:"varint,1,opt,name=who_index,json=whoIndex,proto3" json:"who_index,omitempty"`
	Status   PlayerStauts `protobuf:"varint,2,opt,name=status,proto3,enum=mahjong.log.PlayerStauts" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerStatusEvent) Descriptor deprecated

func (*PlayerStatusEvent) Descriptor() ([]byte, []int)

Deprecated: Use PlayerStatusEvent.ProtoReflect.Descriptor instead.

func (*PlayerStatusEvent) GetStatus

func (x *PlayerStatusEvent) GetStatus() PlayerStauts

func (*PlayerStatusEvent) GetWhoIndex

func (x *PlayerStatusEvent) GetWhoIndex() int64

func (*PlayerStatusEvent) ProtoMessage

func (*PlayerStatusEvent) ProtoMessage()

func (*PlayerStatusEvent) ProtoReflect

func (x *PlayerStatusEvent) ProtoReflect() protoreflect.Message

func (*PlayerStatusEvent) Reset

func (x *PlayerStatusEvent) Reset()

func (*PlayerStatusEvent) String

func (x *PlayerStatusEvent) String() string

type PlayerStauts

type PlayerStauts int32
const (
	PlayerStauts_STATUS_UNDEFINED PlayerStauts = 0
	PlayerStauts_OFFLINE          PlayerStauts = 1
	PlayerStauts_ONLINE           PlayerStauts = 2
)

func (PlayerStauts) Descriptor

func (PlayerStauts) Enum

func (x PlayerStauts) Enum() *PlayerStauts

func (PlayerStauts) EnumDescriptor deprecated

func (PlayerStauts) EnumDescriptor() ([]byte, []int)

Deprecated: Use PlayerStauts.Descriptor instead.

func (PlayerStauts) Number

func (PlayerStauts) String

func (x PlayerStauts) String() string

func (PlayerStauts) Type

type Round

type Round struct {
	Info   *RoundInfo   `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Events []*Event     `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
	Result *RoundResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*Round) Descriptor deprecated

func (*Round) Descriptor() ([]byte, []int)

Deprecated: Use Round.ProtoReflect.Descriptor instead.

func (*Round) GetEvents

func (x *Round) GetEvents() []*Event

func (*Round) GetInfo

func (x *Round) GetInfo() *RoundInfo

func (*Round) GetResult

func (x *Round) GetResult() *RoundResult

func (*Round) ProtoMessage

func (*Round) ProtoMessage()

func (*Round) ProtoReflect

func (x *Round) ProtoReflect() protoreflect.Message

func (*Round) Reset

func (x *Round) Reset()

func (*Round) String

func (x *Round) String() string

type RoundEndReason

type RoundEndReason int32
const (
	RoundEndReason_Round_END_REASON_UNSPECIFIED RoundEndReason = 0
	RoundEndReason_REASON_RON                   RoundEndReason = 1
	RoundEndReason_REASON_TSUMO                 RoundEndReason = 2
	// Game ended at last tile.
	RoundEndReason_REASON_REGULAR_DRAW RoundEndReason = 3
	// This is when game ended by special rule, ex. 4 riichi
	RoundEndReason_REASON_DRAW RoundEndReason = 4
)

func (RoundEndReason) Descriptor

func (RoundEndReason) Enum

func (x RoundEndReason) Enum() *RoundEndReason

func (RoundEndReason) EnumDescriptor deprecated

func (RoundEndReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use RoundEndReason.Descriptor instead.

func (RoundEndReason) Number

func (RoundEndReason) String

func (x RoundEndReason) String() string

func (RoundEndReason) Type

type RoundInfo

type RoundInfo struct {

	// 1-4 East, 5-8 South, 9-12 West, 13-16 North
	// Dealer calculated according to this number.
	RoundNumber int64 `protobuf:"varint,1,opt,name=round_number,json=roundNumber,proto3" json:"round_number,omitempty"`
	// Number of riichi sticks at the moment of round starts.
	RiichiCount  int64 `protobuf:"varint,2,opt,name=riichi_count,json=riichiCount,proto3" json:"riichi_count,omitempty"`
	RenchanCount int64 `protobuf:"varint,3,opt,name=renchan_count,json=renchanCount,proto3" json:"renchan_count,omitempty"`
	// Player point at the moment of round starts.
	Money []int64 `protobuf:"zigzag64,4,rep,packed,name=money,proto3" json:"money,omitempty"`
	Wall  *Wall   `protobuf:"bytes,5,opt,name=wall,proto3" json:"wall,omitempty"`
	// contains filtered or unexported fields
}

func (*RoundInfo) Descriptor deprecated

func (*RoundInfo) Descriptor() ([]byte, []int)

Deprecated: Use RoundInfo.ProtoReflect.Descriptor instead.

func (*RoundInfo) GetMoney

func (x *RoundInfo) GetMoney() []int64

func (*RoundInfo) GetRenchanCount

func (x *RoundInfo) GetRenchanCount() int64

func (*RoundInfo) GetRiichiCount

func (x *RoundInfo) GetRiichiCount() int64

func (*RoundInfo) GetRoundNumber

func (x *RoundInfo) GetRoundNumber() int64

func (*RoundInfo) GetWall

func (x *RoundInfo) GetWall() *Wall

func (*RoundInfo) ProtoMessage

func (*RoundInfo) ProtoMessage()

func (*RoundInfo) ProtoReflect

func (x *RoundInfo) ProtoReflect() protoreflect.Message

func (*RoundInfo) Reset

func (x *RoundInfo) Reset()

func (*RoundInfo) String

func (x *RoundInfo) String() string

type RoundResult

type RoundResult struct {

	// Resulting changes, calculated from money at the start of the round to the end of all payments done
	Changes *Changes `protobuf:"bytes,1,opt,name=changes,proto3" json:"changes,omitempty"`
	// Riichi sticks on the table at the end of the round and afer all payments
	RiichiCount int64          `protobuf:"varint,2,opt,name=riichi_count,json=riichiCount,proto3" json:"riichi_count,omitempty"`
	EndReason   RoundEndReason `protobuf:"varint,3,opt,name=end_reason,json=endReason,proto3,enum=mahjong.log.RoundEndReason" json:"end_reason,omitempty"`
	// contains filtered or unexported fields
}

func (*RoundResult) Descriptor deprecated

func (*RoundResult) Descriptor() ([]byte, []int)

Deprecated: Use RoundResult.ProtoReflect.Descriptor instead.

func (*RoundResult) GetChanges

func (x *RoundResult) GetChanges() *Changes

func (*RoundResult) GetEndReason

func (x *RoundResult) GetEndReason() RoundEndReason

func (*RoundResult) GetRiichiCount

func (x *RoundResult) GetRiichiCount() int64

func (*RoundResult) ProtoMessage

func (*RoundResult) ProtoMessage()

func (*RoundResult) ProtoReflect

func (x *RoundResult) ProtoReflect() protoreflect.Message

func (*RoundResult) Reset

func (x *RoundResult) Reset()

func (*RoundResult) String

func (x *RoundResult) String() string

type Say

type Say int32
const (
	Say_SAY_UNSPECIFIED Say = 0
	Say_RIICHI          Say = 1
	Say_RON             Say = 2
	Say_TSUMO           Say = 3
	// kisekuhai.
	Say_DRAW Say = 4
	Say_KAN  Say = 5
	Say_PON  Say = 6
	Say_CHI  Say = 7
	// Probably will be used later.
	Say_TEMPAI Say = 8
	Say_NOTEN  Say = 9
)

func (Say) Descriptor

func (Say) Descriptor() protoreflect.EnumDescriptor

func (Say) Enum

func (x Say) Enum() *Say

func (Say) EnumDescriptor deprecated

func (Say) EnumDescriptor() ([]byte, []int)

Deprecated: Use Say.Descriptor instead.

func (Say) Number

func (x Say) Number() protoreflect.EnumNumber

func (Say) String

func (x Say) String() string

func (Say) Type

func (Say) Type() protoreflect.EnumType

type SayEvent

type SayEvent struct {
	WhoIndex int64 `protobuf:"varint,1,opt,name=who_index,json=whoIndex,proto3" json:"who_index,omitempty"`
	What     Say   `protobuf:"varint,2,opt,name=what,proto3,enum=mahjong.log.Say" json:"what,omitempty"`
	// contains filtered or unexported fields
}

func (*SayEvent) Descriptor deprecated

func (*SayEvent) Descriptor() ([]byte, []int)

Deprecated: Use SayEvent.ProtoReflect.Descriptor instead.

func (*SayEvent) GetWhat

func (x *SayEvent) GetWhat() Say

func (*SayEvent) GetWhoIndex

func (x *SayEvent) GetWhoIndex() int64

func (*SayEvent) ProtoMessage

func (*SayEvent) ProtoMessage()

func (*SayEvent) ProtoReflect

func (x *SayEvent) ProtoReflect() protoreflect.Message

func (*SayEvent) Reset

func (x *SayEvent) Reset()

func (*SayEvent) String

func (x *SayEvent) String() string

type ScoreChangesEvent

type ScoreChangesEvent struct {

	// New number of total riichi sticks on table.
	RiichiCount int64 `protobuf:"varint,1,opt,name=riichi_count,json=riichiCount,proto3" json:"riichi_count,omitempty"`
	// New scores for every player.
	Changes *Changes `protobuf:"bytes,2,opt,name=changes,proto3" json:"changes,omitempty"`
	// contains filtered or unexported fields
}

Score changed by riichi

func (*ScoreChangesEvent) Descriptor deprecated

func (*ScoreChangesEvent) Descriptor() ([]byte, []int)

Deprecated: Use ScoreChangesEvent.ProtoReflect.Descriptor instead.

func (*ScoreChangesEvent) GetChanges

func (x *ScoreChangesEvent) GetChanges() *Changes

func (*ScoreChangesEvent) GetRiichiCount

func (x *ScoreChangesEvent) GetRiichiCount() int64

func (*ScoreChangesEvent) ProtoMessage

func (*ScoreChangesEvent) ProtoMessage()

func (*ScoreChangesEvent) ProtoReflect

func (x *ScoreChangesEvent) ProtoReflect() protoreflect.Message

func (*ScoreChangesEvent) Reset

func (x *ScoreChangesEvent) Reset()

func (*ScoreChangesEvent) String

func (x *ScoreChangesEvent) String() string

type TakeEvent

type TakeEvent struct {
	WhoIndex int64 `protobuf:"varint,1,opt,name=who_index,json=whoIndex,proto3" json:"who_index,omitempty"`
	// Not filled in game, when other player takes a tile.
	Instance int64 `protobuf:"varint,2,opt,name=instance,proto3" json:"instance,omitempty"`
	// Is tile taken from a dead wall.
	DeadWall bool `protobuf:"varint,3,opt,name=dead_wall,json=deadWall,proto3" json:"dead_wall,omitempty"`
	// contains filtered or unexported fields
}

func (*TakeEvent) Descriptor deprecated

func (*TakeEvent) Descriptor() ([]byte, []int)

Deprecated: Use TakeEvent.ProtoReflect.Descriptor instead.

func (*TakeEvent) GetDeadWall

func (x *TakeEvent) GetDeadWall() bool

func (*TakeEvent) GetInstance

func (x *TakeEvent) GetInstance() int64

func (*TakeEvent) GetWhoIndex

func (x *TakeEvent) GetWhoIndex() int64

func (*TakeEvent) ProtoMessage

func (*TakeEvent) ProtoMessage()

func (*TakeEvent) ProtoReflect

func (x *TakeEvent) ProtoReflect() protoreflect.Message

func (*TakeEvent) Reset

func (x *TakeEvent) Reset()

func (*TakeEvent) String

func (x *TakeEvent) String() string

type UnimplementedLogServiceServer

type UnimplementedLogServiceServer struct {
}

UnimplementedLogServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLogServiceServer) GetLog

type Wall

type Wall struct {
	Wall    *base.Instances `protobuf:"bytes,1,opt,name=wall,proto3" json:"wall,omitempty"`
	Dora    *base.Instances `protobuf:"bytes,2,opt,name=dora,proto3" json:"dora,omitempty"`
	Ura     *base.Instances `protobuf:"bytes,3,opt,name=ura,proto3" json:"ura,omitempty"`
	Rinshan *base.Instances `protobuf:"bytes,4,opt,name=rinshan,proto3" json:"rinshan,omitempty"`
	// Hands for 4 players;
	Hands []*base.Instances `protobuf:"bytes,5,rep,name=hands,proto3" json:"hands,omitempty"`
	// To detect ex. seed.
	WallId string `protobuf:"bytes,6,opt,name=wall_id,json=wallId,proto3" json:"wall_id,omitempty"`
	// 2 numbers 1-6, representing dices.
	// Used only for UI representations.
	// Have no impact on a game.
	// Could be empty.
	Dice []int64 `protobuf:"varint,7,rep,packed,name=dice,proto3" json:"dice,omitempty"`
	// contains filtered or unexported fields
}

Represents starting tile positions.

func (*Wall) Descriptor deprecated

func (*Wall) Descriptor() ([]byte, []int)

Deprecated: Use Wall.ProtoReflect.Descriptor instead.

func (*Wall) GetDice

func (x *Wall) GetDice() []int64

func (*Wall) GetDora

func (x *Wall) GetDora() *base.Instances

func (*Wall) GetHands

func (x *Wall) GetHands() []*base.Instances

func (*Wall) GetRinshan

func (x *Wall) GetRinshan() *base.Instances

func (*Wall) GetUra

func (x *Wall) GetUra() *base.Instances

func (*Wall) GetWall

func (x *Wall) GetWall() *base.Instances

func (*Wall) GetWallId

func (x *Wall) GetWallId() string

func (*Wall) ProtoMessage

func (*Wall) ProtoMessage()

func (*Wall) ProtoReflect

func (x *Wall) ProtoReflect() protoreflect.Message

func (*Wall) Reset

func (x *Wall) Reset()

func (*Wall) String

func (x *Wall) String() string

type WinEvent

type WinEvent struct {

	// If from == who - this is tsumo
	WhoIndex       int64           `protobuf:"varint,1,opt,name=who_index,json=whoIndex,proto3" json:"who_index,omitempty"`
	FromIndex      int64           `protobuf:"varint,2,opt,name=from_index,json=fromIndex,proto3" json:"from_index,omitempty"`
	Instance       int64           `protobuf:"varint,3,opt,name=instance,proto3" json:"instance,omitempty"`
	Hand           *base.Instances `protobuf:"bytes,4,opt,name=hand,proto3" json:"hand,omitempty"`
	Declared       []*base.Meld    `protobuf:"bytes,5,rep,name=declared,proto3" json:"declared,omitempty"`
	DoraIndicators *base.Instances `protobuf:"bytes,6,opt,name=dora_indicators,json=doraIndicators,proto3" json:"dora_indicators,omitempty"`
	UraIndicators  *base.Instances `protobuf:"bytes,7,opt,name=ura_indicators,json=uraIndicators,proto3" json:"ura_indicators,omitempty"`
	Limit          base.Limit      `protobuf:"varint,8,opt,name=limit,proto3,enum=mahjong.base.Limit" json:"limit,omitempty"`
	// Types that are assignable to OneofWinInfo:
	//
	//	*WinEvent_Yaku
	//	*WinEvent_Yakuman
	OneofWinInfo isWinEvent_OneofWinInfo `protobuf_oneof:"oneof_win_info"`
	BaseMoney    int64                   `protobuf:"varint,11,opt,name=base_money,json=baseMoney,proto3" json:"base_money,omitempty"`
	Changes      *Changes                `protobuf:"bytes,12,opt,name=changes,proto3" json:"changes,omitempty"`
	// contains filtered or unexported fields
}

func (*WinEvent) Descriptor deprecated

func (*WinEvent) Descriptor() ([]byte, []int)

Deprecated: Use WinEvent.ProtoReflect.Descriptor instead.

func (*WinEvent) GetBaseMoney

func (x *WinEvent) GetBaseMoney() int64

func (*WinEvent) GetChanges

func (x *WinEvent) GetChanges() *Changes

func (*WinEvent) GetDeclared

func (x *WinEvent) GetDeclared() []*base.Meld

func (*WinEvent) GetDoraIndicators

func (x *WinEvent) GetDoraIndicators() *base.Instances

func (*WinEvent) GetFromIndex

func (x *WinEvent) GetFromIndex() int64

func (*WinEvent) GetHand

func (x *WinEvent) GetHand() *base.Instances

func (*WinEvent) GetInstance

func (x *WinEvent) GetInstance() int64

func (*WinEvent) GetLimit

func (x *WinEvent) GetLimit() base.Limit

func (*WinEvent) GetOneofWinInfo

func (m *WinEvent) GetOneofWinInfo() isWinEvent_OneofWinInfo

func (*WinEvent) GetUraIndicators

func (x *WinEvent) GetUraIndicators() *base.Instances

func (*WinEvent) GetWhoIndex

func (x *WinEvent) GetWhoIndex() int64

func (*WinEvent) GetYaku

func (x *WinEvent) GetYaku() *YakuInfo

func (*WinEvent) GetYakuman

func (x *WinEvent) GetYakuman() *YakumanInfo

func (*WinEvent) ProtoMessage

func (*WinEvent) ProtoMessage()

func (*WinEvent) ProtoReflect

func (x *WinEvent) ProtoReflect() protoreflect.Message

func (*WinEvent) Reset

func (x *WinEvent) Reset()

func (*WinEvent) String

func (x *WinEvent) String() string

type WinEvent_Yaku

type WinEvent_Yaku struct {
	Yaku *YakuInfo `protobuf:"bytes,9,opt,name=yaku,proto3,oneof"`
}

type WinEvent_Yakuman

type WinEvent_Yakuman struct {
	Yakuman *YakumanInfo `protobuf:"bytes,10,opt,name=yakuman,proto3,oneof"`
}

type YakuInfo

type YakuInfo struct {
	Han  int64             `protobuf:"varint,1,opt,name=han,proto3" json:"han,omitempty"`
	Fu   int64             `protobuf:"varint,2,opt,name=fu,proto3" json:"fu,omitempty"`
	Yaku []*base.YakuValue `protobuf:"bytes,3,rep,name=yaku,proto3" json:"yaku,omitempty"`
	// contains filtered or unexported fields
}

func (*YakuInfo) Descriptor deprecated

func (*YakuInfo) Descriptor() ([]byte, []int)

Deprecated: Use YakuInfo.ProtoReflect.Descriptor instead.

func (*YakuInfo) GetFu

func (x *YakuInfo) GetFu() int64

func (*YakuInfo) GetHan

func (x *YakuInfo) GetHan() int64

func (*YakuInfo) GetYaku

func (x *YakuInfo) GetYaku() []*base.YakuValue

func (*YakuInfo) ProtoMessage

func (*YakuInfo) ProtoMessage()

func (*YakuInfo) ProtoReflect

func (x *YakuInfo) ProtoReflect() protoreflect.Message

func (*YakuInfo) Reset

func (x *YakuInfo) Reset()

func (*YakuInfo) String

func (x *YakuInfo) String() string

type YakumanInfo

type YakumanInfo struct {
	Yakuman []*base.YakumanValue `protobuf:"bytes,1,rep,name=yakuman,proto3" json:"yakuman,omitempty"`
	// contains filtered or unexported fields
}

func (*YakumanInfo) Descriptor deprecated

func (*YakumanInfo) Descriptor() ([]byte, []int)

Deprecated: Use YakumanInfo.ProtoReflect.Descriptor instead.

func (*YakumanInfo) GetYakuman

func (x *YakumanInfo) GetYakuman() []*base.YakumanValue

func (*YakumanInfo) ProtoMessage

func (*YakumanInfo) ProtoMessage()

func (*YakumanInfo) ProtoReflect

func (x *YakumanInfo) ProtoReflect() protoreflect.Message

func (*YakumanInfo) Reset

func (x *YakumanInfo) Reset()

func (*YakumanInfo) String

func (x *YakumanInfo) String() string

Jump to

Keyboard shortcuts

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