base

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Wind_name = map[int32]string{
		0: "WIND_UNSPECIFIED",
		1: "EAST",
		2: "SOUTH",
		3: "WEST",
		4: "NORTH",
	}
	Wind_value = map[string]int32{
		"WIND_UNSPECIFIED": 0,
		"EAST":             1,
		"SOUTH":            2,
		"WEST":             3,
		"NORTH":            4,
	}
)

Enum value maps for Wind.

View Source
var (
	Limit_name = map[int32]string{
		0: "LIMIT_UNSPECIFIED",
		1: "MANGAN",
		2: "HANEMAN",
		3: "BAIMAN",
		4: "SANBAIMAN",
		5: "YAKUMAN",
	}
	Limit_value = map[string]int32{
		"LIMIT_UNSPECIFIED": 0,
		"MANGAN":            1,
		"HANEMAN":           2,
		"BAIMAN":            3,
		"SANBAIMAN":         4,
		"YAKUMAN":           5,
	}
)

Enum value maps for Limit.

View Source
var (
	Opponent_name = map[int32]string{
		0: "OPPONENT_UNSPECIFIED",
		1: "SELF",
		2: "RIGHT",
		3: "FRONT",
		4: "LEFT",
	}
	Opponent_value = map[string]int32{
		"OPPONENT_UNSPECIFIED": 0,
		"SELF":                 1,
		"RIGHT":                2,
		"FRONT":                3,
		"LEFT":                 4,
	}
)

Enum value maps for Opponent.

View Source
var (
	Yaku_name = map[int32]string{
		0:  "YAKU_UNSPECIFIED",
		1:  "RIICHI",
		2:  "DABURI",
		3:  "IPPATSU",
		4:  "TSUMO",
		5:  "TANYAO",
		6:  "CHANTA",
		7:  "JUNCHAN",
		8:  "HONROUTO",
		9:  "YAKUHAI",
		10: "HAKU",
		11: "HATSU",
		12: "CHUN",
		13: "WIND_ROUND",
		14: "WIND_SELF",
		15: "TON",
		16: "NAN",
		17: "SJA",
		18: "PEI",
		19: "SELF_TON",
		20: "SELF_NAN",
		21: "SELF_SJA",
		22: "SELF_PEI",
		23: "ROUND_TON",
		24: "ROUND_NAN",
		25: "ROUND_SJA",
		26: "ROUND_PEI",
		27: "CHIITOI",
		28: "TOITOI",
		29: "SANANKOU",
		30: "SANKANTSU",
		31: "SANSHOKU",
		32: "SHOUSANGEN",
		33: "PINFU",
		34: "IPPEIKO",
		35: "RYANPEIKOU",
		36: "ITSUU",
		37: "SANSHOKUDOUKOU",
		38: "HONITSU",
		39: "CHINITSU",
		40: "DORA",
		41: "URADORA",
		42: "AKADORA",
		43: "RENHOU_MANGAN",
		44: "HAITEI",
		45: "HOUTEI",
		46: "RINSHAN",
		47: "CHANKAN",
	}
	Yaku_value = map[string]int32{
		"YAKU_UNSPECIFIED": 0,
		"RIICHI":           1,
		"DABURI":           2,
		"IPPATSU":          3,
		"TSUMO":            4,
		"TANYAO":           5,
		"CHANTA":           6,
		"JUNCHAN":          7,
		"HONROUTO":         8,
		"YAKUHAI":          9,
		"HAKU":             10,
		"HATSU":            11,
		"CHUN":             12,
		"WIND_ROUND":       13,
		"WIND_SELF":        14,
		"TON":              15,
		"NAN":              16,
		"SJA":              17,
		"PEI":              18,
		"SELF_TON":         19,
		"SELF_NAN":         20,
		"SELF_SJA":         21,
		"SELF_PEI":         22,
		"ROUND_TON":        23,
		"ROUND_NAN":        24,
		"ROUND_SJA":        25,
		"ROUND_PEI":        26,
		"CHIITOI":          27,
		"TOITOI":           28,
		"SANANKOU":         29,
		"SANKANTSU":        30,
		"SANSHOKU":         31,
		"SHOUSANGEN":       32,
		"PINFU":            33,
		"IPPEIKO":          34,
		"RYANPEIKOU":       35,
		"ITSUU":            36,
		"SANSHOKUDOUKOU":   37,
		"HONITSU":          38,
		"CHINITSU":         39,
		"DORA":             40,
		"URADORA":          41,
		"AKADORA":          42,
		"RENHOU_MANGAN":    43,
		"HAITEI":           44,
		"HOUTEI":           45,
		"RINSHAN":          46,
		"CHANKAN":          47,
	}
)

Enum value maps for Yaku.

View Source
var (
	Yakuman_name = map[int32]string{
		0:  "YAKUMAN_UNSPECIFIED",
		1:  "KOKUSHI",
		2:  "KOKUSHI13",
		3:  "SUUKANTSU",
		4:  "SUUANKOU",
		5:  "SUUANKOUTANKI",
		6:  "DAISANGEN",
		7:  "SHOUSUUSHI",
		8:  "DAISUUSHI",
		9:  "RYUUIISOU",
		10: "TSUIISOU",
		11: "CHINROUTO",
		12: "CHUURENPOOTO",
		13: "CHUURENPOOTO9",
		14: "TENHOU",
		15: "CHIHOU",
		16: "RENHOU",
	}
	Yakuman_value = map[string]int32{
		"YAKUMAN_UNSPECIFIED": 0,
		"KOKUSHI":             1,
		"KOKUSHI13":           2,
		"SUUKANTSU":           3,
		"SUUANKOU":            4,
		"SUUANKOUTANKI":       5,
		"DAISANGEN":           6,
		"SHOUSUUSHI":          7,
		"DAISUUSHI":           8,
		"RYUUIISOU":           9,
		"TSUIISOU":            10,
		"CHINROUTO":           11,
		"CHUURENPOOTO":        12,
		"CHUURENPOOTO9":       13,
		"TENHOU":              14,
		"CHIHOU":              15,
		"RENHOU":              16,
	}
)

Enum value maps for Yakuman.

View Source
var File_public_base_base_proto protoreflect.FileDescriptor
View Source
var File_public_base_yaku_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Instances

type Instances struct {
	Instances []int64 `protobuf:"varint,1,rep,packed,name=instances,proto3" json:"instances,omitempty"`
	// contains filtered or unexported fields
}

Special holder to be used in repeat.

func (*Instances) Descriptor deprecated

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

Deprecated: Use Instances.ProtoReflect.Descriptor instead.

func (*Instances) GetInstances

func (x *Instances) GetInstances() []int64

func (*Instances) ProtoMessage

func (*Instances) ProtoMessage()

func (*Instances) ProtoReflect

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

func (*Instances) Reset

func (x *Instances) Reset()

func (*Instances) String

func (x *Instances) String() string

type Limit

type Limit int32
const (
	Limit_LIMIT_UNSPECIFIED Limit = 0
	Limit_MANGAN            Limit = 1
	Limit_HANEMAN           Limit = 2
	Limit_BAIMAN            Limit = 3
	Limit_SANBAIMAN         Limit = 4
	Limit_YAKUMAN           Limit = 5
)

func (Limit) Descriptor

func (Limit) Descriptor() protoreflect.EnumDescriptor

func (Limit) Enum

func (x Limit) Enum() *Limit

func (Limit) EnumDescriptor deprecated

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

Deprecated: Use Limit.Descriptor instead.

func (Limit) Number

func (x Limit) Number() protoreflect.EnumNumber

func (Limit) String

func (x Limit) String() string

func (Limit) Type

func (Limit) Type() protoreflect.EnumType

type Meld

type Meld struct {

	// Oponent is set, related to one who declared
	Opponent       Opponent `protobuf:"varint,1,opt,name=opponent,proto3,enum=mahjong.base.Opponent" json:"opponent,omitempty"`
	CalledInstance int64    `protobuf:"varint,2,opt,name=called_instance,json=calledInstance,proto3" json:"called_instance,omitempty"`
	// Only for upgraded pon
	UpgradeInstance int64      `protobuf:"varint,3,opt,name=upgrade_instance,json=upgradeInstance,proto3" json:"upgrade_instance,omitempty"`
	Hand            *Instances `protobuf:"bytes,4,opt,name=hand,proto3" json:"hand,omitempty"`
	// To identify melds on the table.
	// In case of pon upgrade the meld_id will correspond to upgraded pon.
	MeldId int64 `protobuf:"varint,5,opt,name=meld_id,json=meldId,proto3" json:"meld_id,omitempty"`
	// When closed kan declared (or upgrade)
	IncludesTsumo bool `protobuf:"varint,6,opt,name=includes_tsumo,json=includesTsumo,proto3" json:"includes_tsumo,omitempty"`
	// contains filtered or unexported fields
}

func (*Meld) Descriptor deprecated

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

Deprecated: Use Meld.ProtoReflect.Descriptor instead.

func (*Meld) GetCalledInstance

func (x *Meld) GetCalledInstance() int64

func (*Meld) GetHand

func (x *Meld) GetHand() *Instances

func (*Meld) GetIncludesTsumo

func (x *Meld) GetIncludesTsumo() bool

func (*Meld) GetMeldId

func (x *Meld) GetMeldId() int64

func (*Meld) GetOpponent

func (x *Meld) GetOpponent() Opponent

func (*Meld) GetUpgradeInstance

func (x *Meld) GetUpgradeInstance() int64

func (*Meld) ProtoMessage

func (*Meld) ProtoMessage()

func (*Meld) ProtoReflect

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

func (*Meld) Reset

func (x *Meld) Reset()

func (*Meld) String

func (x *Meld) String() string

type Opponent

type Opponent int32
const (
	Opponent_OPPONENT_UNSPECIFIED Opponent = 0
	Opponent_SELF                 Opponent = 1
	Opponent_RIGHT                Opponent = 2
	Opponent_FRONT                Opponent = 3
	Opponent_LEFT                 Opponent = 4
)

func (Opponent) Descriptor

func (Opponent) Descriptor() protoreflect.EnumDescriptor

func (Opponent) Enum

func (x Opponent) Enum() *Opponent

func (Opponent) EnumDescriptor deprecated

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

Deprecated: Use Opponent.Descriptor instead.

func (Opponent) Number

func (x Opponent) Number() protoreflect.EnumNumber

func (Opponent) String

func (x Opponent) String() string

func (Opponent) Type

type Wind

type Wind int32
const (
	Wind_WIND_UNSPECIFIED Wind = 0
	Wind_EAST             Wind = 1
	Wind_SOUTH            Wind = 2
	Wind_WEST             Wind = 3
	Wind_NORTH            Wind = 4
)

func (Wind) Descriptor

func (Wind) Descriptor() protoreflect.EnumDescriptor

func (Wind) Enum

func (x Wind) Enum() *Wind

func (Wind) EnumDescriptor deprecated

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

Deprecated: Use Wind.Descriptor instead.

func (Wind) Number

func (x Wind) Number() protoreflect.EnumNumber

func (Wind) String

func (x Wind) String() string

func (Wind) Type

func (Wind) Type() protoreflect.EnumType

type Yaku

type Yaku int32

This table contains several yakus, meaning the same, depending on choosen formating rules. For example there is YAKUHAI, TON, SELF_TON, ROUND_TON.

const (
	Yaku_YAKU_UNSPECIFIED Yaku = 0
	Yaku_RIICHI           Yaku = 1
	Yaku_DABURI           Yaku = 2
	Yaku_IPPATSU          Yaku = 3
	Yaku_TSUMO            Yaku = 4
	Yaku_TANYAO           Yaku = 5
	Yaku_CHANTA           Yaku = 6
	Yaku_JUNCHAN          Yaku = 7
	Yaku_HONROUTO         Yaku = 8
	// yakuhai and variants
	Yaku_YAKUHAI        Yaku = 9
	Yaku_HAKU           Yaku = 10
	Yaku_HATSU          Yaku = 11
	Yaku_CHUN           Yaku = 12
	Yaku_WIND_ROUND     Yaku = 13
	Yaku_WIND_SELF      Yaku = 14
	Yaku_TON            Yaku = 15
	Yaku_NAN            Yaku = 16
	Yaku_SJA            Yaku = 17
	Yaku_PEI            Yaku = 18
	Yaku_SELF_TON       Yaku = 19
	Yaku_SELF_NAN       Yaku = 20
	Yaku_SELF_SJA       Yaku = 21
	Yaku_SELF_PEI       Yaku = 22
	Yaku_ROUND_TON      Yaku = 23
	Yaku_ROUND_NAN      Yaku = 24
	Yaku_ROUND_SJA      Yaku = 25
	Yaku_ROUND_PEI      Yaku = 26
	Yaku_CHIITOI        Yaku = 27
	Yaku_TOITOI         Yaku = 28
	Yaku_SANANKOU       Yaku = 29
	Yaku_SANKANTSU      Yaku = 30
	Yaku_SANSHOKU       Yaku = 31
	Yaku_SHOUSANGEN     Yaku = 32
	Yaku_PINFU          Yaku = 33
	Yaku_IPPEIKO        Yaku = 34
	Yaku_RYANPEIKOU     Yaku = 35
	Yaku_ITSUU          Yaku = 36
	Yaku_SANSHOKUDOUKOU Yaku = 37
	Yaku_HONITSU        Yaku = 38
	Yaku_CHINITSU       Yaku = 39
	Yaku_DORA           Yaku = 40
	Yaku_URADORA        Yaku = 41
	Yaku_AKADORA        Yaku = 42
	Yaku_RENHOU_MANGAN  Yaku = 43
	Yaku_HAITEI         Yaku = 44
	Yaku_HOUTEI         Yaku = 45
	Yaku_RINSHAN        Yaku = 46
	Yaku_CHANKAN        Yaku = 47
)

func (Yaku) Descriptor

func (Yaku) Descriptor() protoreflect.EnumDescriptor

func (Yaku) Enum

func (x Yaku) Enum() *Yaku

func (Yaku) EnumDescriptor deprecated

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

Deprecated: Use Yaku.Descriptor instead.

func (Yaku) Number

func (x Yaku) Number() protoreflect.EnumNumber

func (Yaku) String

func (x Yaku) String() string

func (Yaku) Type

func (Yaku) Type() protoreflect.EnumType

type YakuValue

type YakuValue struct {
	Yaku Yaku `protobuf:"varint,1,opt,name=yaku,proto3,enum=mahjong.base.Yaku" json:"yaku,omitempty"`
	// Han value
	Han int64 `protobuf:"varint,2,opt,name=han,proto3" json:"han,omitempty"`
	// contains filtered or unexported fields
}

func (*YakuValue) Descriptor deprecated

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

Deprecated: Use YakuValue.ProtoReflect.Descriptor instead.

func (*YakuValue) GetHan

func (x *YakuValue) GetHan() int64

func (*YakuValue) GetYaku

func (x *YakuValue) GetYaku() Yaku

func (*YakuValue) ProtoMessage

func (*YakuValue) ProtoMessage()

func (*YakuValue) ProtoReflect

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

func (*YakuValue) Reset

func (x *YakuValue) Reset()

func (*YakuValue) String

func (x *YakuValue) String() string

type Yakuman

type Yakuman int32
const (
	Yakuman_YAKUMAN_UNSPECIFIED Yakuman = 0
	Yakuman_KOKUSHI             Yakuman = 1
	Yakuman_KOKUSHI13           Yakuman = 2
	Yakuman_SUUKANTSU           Yakuman = 3
	Yakuman_SUUANKOU            Yakuman = 4
	Yakuman_SUUANKOUTANKI       Yakuman = 5
	Yakuman_DAISANGEN           Yakuman = 6
	Yakuman_SHOUSUUSHI          Yakuman = 7
	Yakuman_DAISUUSHI           Yakuman = 8
	Yakuman_RYUUIISOU           Yakuman = 9
	Yakuman_TSUIISOU            Yakuman = 10
	Yakuman_CHINROUTO           Yakuman = 11
	Yakuman_CHUURENPOOTO        Yakuman = 12
	Yakuman_CHUURENPOOTO9       Yakuman = 13
	Yakuman_TENHOU              Yakuman = 14
	Yakuman_CHIHOU              Yakuman = 15
	Yakuman_RENHOU              Yakuman = 16
)

func (Yakuman) Descriptor

func (Yakuman) Descriptor() protoreflect.EnumDescriptor

func (Yakuman) Enum

func (x Yakuman) Enum() *Yakuman

func (Yakuman) EnumDescriptor deprecated

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

Deprecated: Use Yakuman.Descriptor instead.

func (Yakuman) Number

func (x Yakuman) Number() protoreflect.EnumNumber

func (Yakuman) String

func (x Yakuman) String() string

func (Yakuman) Type

func (Yakuman) Type() protoreflect.EnumType

type YakumanValue

type YakumanValue struct {
	Yakuman Yakuman `protobuf:"varint,1,opt,name=yakuman,proto3,enum=mahjong.base.Yakuman" json:"yakuman,omitempty"`
	// Used 1 for single and 2 for double yakumans
	Multiplier int64 `protobuf:"varint,2,opt,name=multiplier,proto3" json:"multiplier,omitempty"`
	// contains filtered or unexported fields
}

func (*YakumanValue) Descriptor deprecated

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

Deprecated: Use YakumanValue.ProtoReflect.Descriptor instead.

func (*YakumanValue) GetMultiplier

func (x *YakumanValue) GetMultiplier() int64

func (*YakumanValue) GetYakuman

func (x *YakumanValue) GetYakuman() Yakuman

func (*YakumanValue) ProtoMessage

func (*YakumanValue) ProtoMessage()

func (*YakumanValue) ProtoReflect

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

func (*YakumanValue) Reset

func (x *YakumanValue) Reset()

func (*YakumanValue) String

func (x *YakumanValue) String() string

Jump to

Keyboard shortcuts

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