rules

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KanDoraOpen_name = map[int32]string{
		0: "KANDORA_OPEN_UNSPECEFIED",
		1: "DONT_OPEN",
		2: "INSTANT",
		3: "AFTER_ACTION",
	}
	KanDoraOpen_value = map[string]int32{
		"KANDORA_OPEN_UNSPECEFIED": 0,
		"DONT_OPEN":                1,
		"INSTANT":                  2,
		"AFTER_ACTION":             3,
	}
)

Enum value maps for KanDoraOpen.

View Source
var (
	Atodzuke_name = map[int32]string{
		0: "ATODZUKE_UNSPECIFIED",
		1: "ATODZUKE_ALLOWED",
		2: "ATODZUKE_FORBIDDEN_SOFT",
		3: "ATODZUKE_FORBIDDEN_STRICT",
	}
	Atodzuke_value = map[string]int32{
		"ATODZUKE_UNSPECIFIED":      0,
		"ATODZUKE_ALLOWED":          1,
		"ATODZUKE_FORBIDDEN_SOFT":   2,
		"ATODZUKE_FORBIDDEN_STRICT": 3,
	}
)

Enum value maps for Atodzuke.

View Source
var (
	AgariYame_name = map[int32]string{
		0: "AGARI_YAME_UNSPECIFIED",
		1: "IMPLICIT_END",
		2: "EXPLICIT_CONTINUE",
		3: "IMPLICIT_CONTINUE",
	}
	AgariYame_value = map[string]int32{
		"AGARI_YAME_UNSPECIFIED": 0,
		"IMPLICIT_END":           1,
		"EXPLICIT_CONTINUE":      2,
		"IMPLICIT_CONTINUE":      3,
	}
)

Enum value maps for AgariYame.

View Source
var (
	Shifting_name = map[int32]string{
		0: "SHIFTING_UNSPECIFIED",
		1: "SHIFTING_ALLOWED",
		2: "SHIFTING_FORBIDDEN_SOFT",
		3: "SHIFTING_FORBIDDEN_STRICT",
	}
	Shifting_value = map[string]int32{
		"SHIFTING_UNSPECIFIED":      0,
		"SHIFTING_ALLOWED":          1,
		"SHIFTING_FORBIDDEN_SOFT":   2,
		"SHIFTING_FORBIDDEN_STRICT": 3,
	}
)

Enum value maps for Shifting.

View Source
var File_public_rules_rules_proto protoreflect.FileDescriptor
View Source
var File_public_rules_rules_service_proto protoreflect.FileDescriptor

Functions

func RegisterRulesServiceServer

func RegisterRulesServiceServer(s *grpc.Server, srv RulesServiceServer)

Types

type AgariYame

type AgariYame int32
const (
	AgariYame_AGARI_YAME_UNSPECIFIED AgariYame = 0
	// Game ends.
	AgariYame_IMPLICIT_END AgariYame = 1
	// Game might be continued (player asked). (TODO: Implement)
	AgariYame_EXPLICIT_CONTINUE AgariYame = 2
	// Game must be continued.
	AgariYame_IMPLICIT_CONTINUE AgariYame = 3
)

func (AgariYame) Descriptor

func (AgariYame) Descriptor() protoreflect.EnumDescriptor

func (AgariYame) Enum

func (x AgariYame) Enum() *AgariYame

func (AgariYame) EnumDescriptor deprecated

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

Deprecated: Use AgariYame.Descriptor instead.

func (AgariYame) Number

func (x AgariYame) Number() protoreflect.EnumNumber

func (AgariYame) String

func (x AgariYame) String() string

func (AgariYame) Type

type Atodzuke

type Atodzuke int32
const (
	Atodzuke_ATODZUKE_UNSPECIFIED Atodzuke = 0
	Atodzuke_ATODZUKE_ALLOWED     Atodzuke = 1
	// Allowed when all waits gives some yaku.
	Atodzuke_ATODZUKE_FORBIDDEN_SOFT Atodzuke = 2
	// Should already have yaku. Eg. syanpon for both yakuhai does not fit.
	Atodzuke_ATODZUKE_FORBIDDEN_STRICT Atodzuke = 3
)

func (Atodzuke) Descriptor

func (Atodzuke) Descriptor() protoreflect.EnumDescriptor

func (Atodzuke) Enum

func (x Atodzuke) Enum() *Atodzuke

func (Atodzuke) EnumDescriptor deprecated

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

Deprecated: Use Atodzuke.Descriptor instead.

func (Atodzuke) Number

func (x Atodzuke) Number() protoreflect.EnumNumber

func (Atodzuke) String

func (x Atodzuke) String() string

func (Atodzuke) Type

type ComplexUma

type ComplexUma struct {
	DefaultMoney []int64 `protobuf:"zigzag64,1,rep,packed,name=default_money,json=defaultMoney,proto3" json:"default_money,omitempty"`
	Minus1Money  []int64 `protobuf:"zigzag64,2,rep,packed,name=minus1_money,json=minus1Money,proto3" json:"minus1_money,omitempty"`
	Plus1Money   []int64 `protobuf:"zigzag64,3,rep,packed,name=plus1_money,json=plus1Money,proto3" json:"plus1_money,omitempty"`
	// contains filtered or unexported fields
}

Complex uma (binta) is used in JPML-A. Still classic uma could be described this way with all 3 field equal.

func (*ComplexUma) Descriptor deprecated

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

Deprecated: Use ComplexUma.ProtoReflect.Descriptor instead.

func (*ComplexUma) GetDefaultMoney

func (x *ComplexUma) GetDefaultMoney() []int64

func (*ComplexUma) GetMinus1Money

func (x *ComplexUma) GetMinus1Money() []int64

func (*ComplexUma) GetPlus1Money

func (x *ComplexUma) GetPlus1Money() []int64

func (*ComplexUma) ProtoMessage

func (*ComplexUma) ProtoMessage()

func (*ComplexUma) ProtoReflect

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

func (*ComplexUma) Reset

func (x *ComplexUma) Reset()

func (*ComplexUma) String

func (x *ComplexUma) String() string

type Draw

type Draw struct {
	Winds   bool `protobuf:"varint,1,opt,name=winds,proto3" json:"winds,omitempty"`
	Kokushi bool `protobuf:"varint,2,opt,name=kokushi,proto3" json:"kokushi,omitempty"`
	Kans    bool `protobuf:"varint,3,opt,name=kans,proto3" json:"kans,omitempty"`
	Riichi  bool `protobuf:"varint,4,opt,name=riichi,proto3" json:"riichi,omitempty"`
	Ron3    bool `protobuf:"varint,5,opt,name=ron3,proto3" json:"ron3,omitempty"`
	// contains filtered or unexported fields
}

func (*Draw) Descriptor deprecated

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

Deprecated: Use Draw.ProtoReflect.Descriptor instead.

func (*Draw) GetKans

func (x *Draw) GetKans() bool

func (*Draw) GetKokushi

func (x *Draw) GetKokushi() bool

func (*Draw) GetRiichi

func (x *Draw) GetRiichi() bool

func (*Draw) GetRon3

func (x *Draw) GetRon3() bool

func (*Draw) GetWinds

func (x *Draw) GetWinds() bool

func (*Draw) ProtoMessage

func (*Draw) ProtoMessage()

func (*Draw) ProtoReflect

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

func (*Draw) Reset

func (x *Draw) Reset()

func (*Draw) String

func (x *Draw) String() string

type Game

type Game struct {

	// Dealer could end the game if first in orasu.
	AgariYame              AgariYame `protobuf:"varint,1,opt,name=agari_yame,json=agariYame,proto3,enum=mahjong.rules.AgariYame" json:"agari_yame,omitempty"`
	ChiShift               Shifting  `protobuf:"varint,2,opt,name=chi_shift,json=chiShift,proto3,enum=mahjong.rules.Shifting" json:"chi_shift,omitempty"`
	EndByBancrocity        bool      `protobuf:"varint,3,opt,name=end_by_bancrocity,json=endByBancrocity,proto3" json:"end_by_bancrocity,omitempty"`
	Nagashi                bool      `protobuf:"varint,4,opt,name=nagashi,proto3" json:"nagashi,omitempty"`
	Atamahane              bool      `protobuf:"varint,5,opt,name=atamahane,proto3" json:"atamahane,omitempty"`
	HonbaPayedToAll        bool      `protobuf:"varint,6,opt,name=honba_payed_to_all,json=honbaPayedToAll,proto3" json:"honba_payed_to_all,omitempty"`
	RiichiReturnOnMultiron bool      `` /* 132-byte string literal not displayed */
	// Chi priority if clicked first.
	SpeedChi bool `protobuf:"varint,8,opt,name=speed_chi,json=speedChi,proto3" json:"speed_chi,omitempty"`
	// Calls displayed, event if waiting for a higher priority choises.
	SayOnClick               bool     `protobuf:"varint,9,opt,name=say_on_click,json=sayOnClick,proto3" json:"say_on_click,omitempty"`
	ShouldHaveMoneyForRiichi bool     `` /* 141-byte string literal not displayed */
	Atodzuke                 Atodzuke `protobuf:"varint,11,opt,name=atodzuke,proto3,enum=mahjong.rules.Atodzuke" json:"atodzuke,omitempty"`
	StartMoney               int64    `protobuf:"varint,12,opt,name=start_money,json=startMoney,proto3" json:"start_money,omitempty"`
	// At the end of the game, money reduced by start points
	EndReduceMoney int64 `protobuf:"varint,13,opt,name=end_reduce_money,json=endReduceMoney,proto3" json:"end_reduce_money,omitempty"`
	OkaMoney       int64 `protobuf:"varint,14,opt,name=oka_money,json=okaMoney,proto3" json:"oka_money,omitempty"`
	// Ex. At least 30000 to end the game.
	MinWinMoney int64 `protobuf:"varint,15,opt,name=min_win_money,json=minWinMoney,proto3" json:"min_win_money,omitempty"`
	// Ex. West for hanchans, until min_win_money condition fits.
	MaxLastWind base.Wind `protobuf:"varint,16,opt,name=max_last_wind,json=maxLastWind,proto3,enum=mahjong.base.Wind" json:"max_last_wind,omitempty"`
	// Ex. East for hanchans. Could end here if conditions meets.
	LastWind    base.Wind   `protobuf:"varint,17,opt,name=last_wind,json=lastWind,proto3,enum=mahjong.base.Wind" json:"last_wind,omitempty"`
	Uma         *ComplexUma `protobuf:"bytes,18,opt,name=uma,proto3" json:"uma,omitempty"`
	Draw        *Draw       `protobuf:"bytes,19,opt,name=draw,proto3" json:"draw,omitempty"`
	KanDoraOpen KanDoraOpen `` /* 129-byte string literal not displayed */
	// In case of same points, players share uma.
	UmaShare bool `protobuf:"varint,21,opt,name=uma_share,json=umaShare,proto3" json:"uma_share,omitempty"`
	// In case there are riichi sticks
	RiichiSticksGoesToFirst bool `` /* 138-byte string literal not displayed */
	Pao                     *Pao `protobuf:"bytes,23,opt,name=pao,proto3" json:"pao,omitempty"`
	// Possible values: 2,3,4
	NumberOfPlayers int64 `protobuf:"varint,24,opt,name=number_of_players,json=numberOfPlayers,proto3" json:"number_of_players,omitempty"`
	// Not allowed in sanma
	ChiAllowed bool `protobuf:"varint,25,opt,name=chi_allowed,json=chiAllowed,proto3" json:"chi_allowed,omitempty"`
	// User asked if he wants to show noten (not for riichi)
	SuggestNotean bool `protobuf:"varint,26,opt,name=suggest_notean,json=suggestNotean,proto3" json:"suggest_notean,omitempty"`
	// contains filtered or unexported fields
}

func (*Game) Descriptor deprecated

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

Deprecated: Use Game.ProtoReflect.Descriptor instead.

func (*Game) GetAgariYame

func (x *Game) GetAgariYame() AgariYame

func (*Game) GetAtamahane

func (x *Game) GetAtamahane() bool

func (*Game) GetAtodzuke

func (x *Game) GetAtodzuke() Atodzuke

func (*Game) GetChiAllowed

func (x *Game) GetChiAllowed() bool

func (*Game) GetChiShift

func (x *Game) GetChiShift() Shifting

func (*Game) GetDraw

func (x *Game) GetDraw() *Draw

func (*Game) GetEndByBancrocity

func (x *Game) GetEndByBancrocity() bool

func (*Game) GetEndReduceMoney

func (x *Game) GetEndReduceMoney() int64

func (*Game) GetHonbaPayedToAll

func (x *Game) GetHonbaPayedToAll() bool

func (*Game) GetKanDoraOpen

func (x *Game) GetKanDoraOpen() KanDoraOpen

func (*Game) GetLastWind

func (x *Game) GetLastWind() base.Wind

func (*Game) GetMaxLastWind

func (x *Game) GetMaxLastWind() base.Wind

func (*Game) GetMinWinMoney

func (x *Game) GetMinWinMoney() int64

func (*Game) GetNagashi

func (x *Game) GetNagashi() bool

func (*Game) GetNumberOfPlayers

func (x *Game) GetNumberOfPlayers() int64

func (*Game) GetOkaMoney

func (x *Game) GetOkaMoney() int64

func (*Game) GetPao

func (x *Game) GetPao() *Pao

func (*Game) GetRiichiReturnOnMultiron

func (x *Game) GetRiichiReturnOnMultiron() bool

func (*Game) GetRiichiSticksGoesToFirst

func (x *Game) GetRiichiSticksGoesToFirst() bool

func (*Game) GetSayOnClick

func (x *Game) GetSayOnClick() bool

func (*Game) GetShouldHaveMoneyForRiichi

func (x *Game) GetShouldHaveMoneyForRiichi() bool

func (*Game) GetSpeedChi

func (x *Game) GetSpeedChi() bool

func (*Game) GetStartMoney

func (x *Game) GetStartMoney() int64

func (*Game) GetSuggestNotean

func (x *Game) GetSuggestNotean() bool

func (*Game) GetUma

func (x *Game) GetUma() *ComplexUma

func (*Game) GetUmaShare

func (x *Game) GetUmaShare() bool

func (*Game) ProtoMessage

func (*Game) ProtoMessage()

func (*Game) ProtoReflect

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

func (*Game) Reset

func (x *Game) Reset()

func (*Game) String

func (x *Game) String() string

type GetRuleRequest

type GetRuleRequest struct {
	RuleId string `protobuf:"bytes,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRuleRequest) Descriptor deprecated

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

Deprecated: Use GetRuleRequest.ProtoReflect.Descriptor instead.

func (*GetRuleRequest) GetRuleId

func (x *GetRuleRequest) GetRuleId() string

func (*GetRuleRequest) ProtoMessage

func (*GetRuleRequest) ProtoMessage()

func (*GetRuleRequest) ProtoReflect

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

func (*GetRuleRequest) Reset

func (x *GetRuleRequest) Reset()

func (*GetRuleRequest) String

func (x *GetRuleRequest) String() string

type GetRuleResponse

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

func (*GetRuleResponse) Descriptor deprecated

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

Deprecated: Use GetRuleResponse.ProtoReflect.Descriptor instead.

func (*GetRuleResponse) GetRuleset

func (x *GetRuleResponse) GetRuleset() *Ruleset

func (*GetRuleResponse) ProtoMessage

func (*GetRuleResponse) ProtoMessage()

func (*GetRuleResponse) ProtoReflect

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

func (*GetRuleResponse) Reset

func (x *GetRuleResponse) Reset()

func (*GetRuleResponse) String

func (x *GetRuleResponse) String() string

type KanDoraOpen

type KanDoraOpen int32
const (
	KanDoraOpen_KANDORA_OPEN_UNSPECEFIED KanDoraOpen = 0
	// No kan dora open in JPML-A
	KanDoraOpen_DONT_OPEN KanDoraOpen = 1
	// Instant dora open in EMA
	KanDoraOpen_INSTANT KanDoraOpen = 2
	// Afer next kan call or drop (for opened kans)
	KanDoraOpen_AFTER_ACTION KanDoraOpen = 3
)

func (KanDoraOpen) Descriptor

func (KanDoraOpen) Enum

func (x KanDoraOpen) Enum() *KanDoraOpen

func (KanDoraOpen) EnumDescriptor deprecated

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

Deprecated: Use KanDoraOpen.Descriptor instead.

func (KanDoraOpen) Number

func (x KanDoraOpen) Number() protoreflect.EnumNumber

func (KanDoraOpen) String

func (x KanDoraOpen) String() string

func (KanDoraOpen) Type

type ListRulesRequest

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

func (*ListRulesRequest) Descriptor deprecated

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

Deprecated: Use ListRulesRequest.ProtoReflect.Descriptor instead.

func (*ListRulesRequest) ProtoMessage

func (*ListRulesRequest) ProtoMessage()

func (*ListRulesRequest) ProtoReflect

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

func (*ListRulesRequest) Reset

func (x *ListRulesRequest) Reset()

func (*ListRulesRequest) String

func (x *ListRulesRequest) String() string

type ListRulesResponse

type ListRulesResponse struct {
	Rules []*Ruleset `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRulesResponse) Descriptor deprecated

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

Deprecated: Use ListRulesResponse.ProtoReflect.Descriptor instead.

func (*ListRulesResponse) GetRules

func (x *ListRulesResponse) GetRules() []*Ruleset

func (*ListRulesResponse) ProtoMessage

func (*ListRulesResponse) ProtoMessage()

func (*ListRulesResponse) ProtoReflect

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

func (*ListRulesResponse) Reset

func (x *ListRulesResponse) Reset()

func (*ListRulesResponse) String

func (x *ListRulesResponse) String() string

type Pao

type Pao struct {
	Winds   bool `protobuf:"varint,1,opt,name=winds,proto3" json:"winds,omitempty"`
	Dragons bool `protobuf:"varint,2,opt,name=dragons,proto3" json:"dragons,omitempty"`
	Kans    bool `protobuf:"varint,3,opt,name=kans,proto3" json:"kans,omitempty"`
	Rinshan bool `protobuf:"varint,4,opt,name=rinshan,proto3" json:"rinshan,omitempty"`
	// contains filtered or unexported fields
}

func (*Pao) Descriptor deprecated

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

Deprecated: Use Pao.ProtoReflect.Descriptor instead.

func (*Pao) GetDragons

func (x *Pao) GetDragons() bool

func (*Pao) GetKans

func (x *Pao) GetKans() bool

func (*Pao) GetRinshan

func (x *Pao) GetRinshan() bool

func (*Pao) GetWinds

func (x *Pao) GetWinds() bool

func (*Pao) ProtoMessage

func (*Pao) ProtoMessage()

func (*Pao) ProtoReflect

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

func (*Pao) Reset

func (x *Pao) Reset()

func (*Pao) String

func (x *Pao) String() string

type RulesServiceClient

type RulesServiceClient interface {
	ListRules(ctx context.Context, in *ListRulesRequest, opts ...grpc.CallOption) (*ListRulesResponse, error)
	GetRule(ctx context.Context, in *GetRuleRequest, opts ...grpc.CallOption) (*GetRuleResponse, error)
}

RulesServiceClient is the client API for RulesService service.

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

type RulesServiceServer

type RulesServiceServer interface {
	ListRules(context.Context, *ListRulesRequest) (*ListRulesResponse, error)
	GetRule(context.Context, *GetRuleRequest) (*GetRuleResponse, error)
}

RulesServiceServer is the server API for RulesService service.

type Ruleset

type Ruleset struct {
	Id          string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Description string   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Scoring     *Scoring `protobuf:"bytes,3,opt,name=scoring,proto3" json:"scoring,omitempty"`
	Yaku        *Yaku    `protobuf:"bytes,4,opt,name=yaku,proto3" json:"yaku,omitempty"`
	Game        *Game    `protobuf:"bytes,5,opt,name=game,proto3" json:"game,omitempty"`
	// contains filtered or unexported fields
}

func (*Ruleset) Descriptor deprecated

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

Deprecated: Use Ruleset.ProtoReflect.Descriptor instead.

func (*Ruleset) GetDescription

func (x *Ruleset) GetDescription() string

func (*Ruleset) GetGame

func (x *Ruleset) GetGame() *Game

func (*Ruleset) GetId

func (x *Ruleset) GetId() string

func (*Ruleset) GetScoring

func (x *Ruleset) GetScoring() *Scoring

func (*Ruleset) GetYaku

func (x *Ruleset) GetYaku() *Yaku

func (*Ruleset) ProtoMessage

func (*Ruleset) ProtoMessage()

func (*Ruleset) ProtoReflect

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

func (*Ruleset) Reset

func (x *Ruleset) Reset()

func (*Ruleset) String

func (x *Ruleset) String() string

type Scoring

type Scoring struct {

	// 7700 rounds to 8000
	ManganRound  bool `protobuf:"varint,1,opt,name=mangan_round,json=manganRound,proto3" json:"mangan_round,omitempty"`
	KazoeYakuman bool `protobuf:"varint,2,opt,name=kazoe_yakuman,json=kazoeYakuman,proto3" json:"kazoe_yakuman,omitempty"`
	YakumanSum   bool `protobuf:"varint,3,opt,name=yakuman_sum,json=yakumanSum,proto3" json:"yakuman_sum,omitempty"`
	// The default should be 100, but could differ in some rules (eg. 500)
	HonbaMoney     int64          `protobuf:"varint,4,opt,name=honba_money,json=honbaMoney,proto3" json:"honba_money,omitempty"`
	DoubleYakumans []base.Yakuman `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Scoring) Descriptor deprecated

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

Deprecated: Use Scoring.ProtoReflect.Descriptor instead.

func (*Scoring) GetDoubleYakumans

func (x *Scoring) GetDoubleYakumans() []base.Yakuman

func (*Scoring) GetHonbaMoney

func (x *Scoring) GetHonbaMoney() int64

func (*Scoring) GetKazoeYakuman

func (x *Scoring) GetKazoeYakuman() bool

func (*Scoring) GetManganRound

func (x *Scoring) GetManganRound() bool

func (*Scoring) GetYakumanSum

func (x *Scoring) GetYakumanSum() bool

func (*Scoring) ProtoMessage

func (*Scoring) ProtoMessage()

func (*Scoring) ProtoReflect

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

func (*Scoring) Reset

func (x *Scoring) Reset()

func (*Scoring) String

func (x *Scoring) String() string

type Shifting

type Shifting int32
const (
	Shifting_SHIFTING_UNSPECIFIED Shifting = 0
	Shifting_SHIFTING_ALLOWED     Shifting = 1
	// Only shifting alloed. Ex. for 34+5, 2=allowed, 5=forbidden
	Shifting_SHIFTING_FORBIDDEN_SOFT Shifting = 2
	// for 24+5 both 2 and 5 forbidden
	Shifting_SHIFTING_FORBIDDEN_STRICT Shifting = 3
)

func (Shifting) Descriptor

func (Shifting) Descriptor() protoreflect.EnumDescriptor

func (Shifting) Enum

func (x Shifting) Enum() *Shifting

func (Shifting) EnumDescriptor deprecated

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

Deprecated: Use Shifting.Descriptor instead.

func (Shifting) Number

func (x Shifting) Number() protoreflect.EnumNumber

func (Shifting) String

func (x Shifting) String() string

func (Shifting) Type

type Timeouts

type Timeouts struct {

	// Base time to think on server suggest. Ex. 10 seconds.
	// Max value: 30 seconds.
	// Min value: 5 seconds.
	Base *duration.Duration `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	// Additional time to think in this round (if base time passed). Ex. 5 seconds.
	// Max value: 30 seconds.
	// Min value: 0. (or nil)
	Extra *duration.Duration `protobuf:"bytes,2,opt,name=extra,proto3" json:"extra,omitempty"`
	// If player makes a decition in base time, than recover time added to extra.
	// Limited by extra value. Ex. 1 second.
	// Value: >=0 (or nil)
	Recover *duration.Duration `protobuf:"bytes,3,opt,name=recover,proto3" json:"recover,omitempty"`
	// The game will move very fast in case there are no suggest.
	// This is a delay after each player action.
	// Max value: 1 second.
	// Could be 0 (nil) for robot games.
	Delay *duration.Duration `protobuf:"bytes,4,opt,name=delay,proto3" json:"delay,omitempty"`
	// contains filtered or unexported fields
}

func (*Timeouts) Descriptor deprecated

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

Deprecated: Use Timeouts.ProtoReflect.Descriptor instead.

func (*Timeouts) GetBase

func (x *Timeouts) GetBase() *duration.Duration

func (*Timeouts) GetDelay

func (x *Timeouts) GetDelay() *duration.Duration

func (*Timeouts) GetExtra

func (x *Timeouts) GetExtra() *duration.Duration

func (*Timeouts) GetRecover

func (x *Timeouts) GetRecover() *duration.Duration

func (*Timeouts) ProtoMessage

func (*Timeouts) ProtoMessage()

func (*Timeouts) ProtoReflect

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

func (*Timeouts) Reset

func (x *Timeouts) Reset()

func (*Timeouts) String

func (x *Timeouts) String() string

type UnimplementedRulesServiceServer

type UnimplementedRulesServiceServer struct {
}

UnimplementedRulesServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRulesServiceServer) GetRule

func (*UnimplementedRulesServiceServer) ListRules

type Yaku

type Yaku struct {
	OpenTanyao bool `protobuf:"varint,1,opt,name=open_tanyao,json=openTanyao,proto3" json:"open_tanyao,omitempty"`
	// Does rinshan combine with haitei
	HaiteiFromLiveOnly bool `protobuf:"varint,2,opt,name=haitei_from_live_only,json=haiteiFromLiveOnly,proto3" json:"haitei_from_live_only,omitempty"`
	Ura                bool `protobuf:"varint,3,opt,name=ura,proto3" json:"ura,omitempty"`
	// No ipatsu in JPML-A
	Ipatsu  bool            `protobuf:"varint,4,opt,name=ipatsu,proto3" json:"ipatsu,omitempty"`
	AkaDora *base.Instances `protobuf:"bytes,5,opt,name=aka_dora,json=akaDora,proto3" json:"aka_dora,omitempty"`
	Renhou  base.Limit      `protobuf:"varint,6,opt,name=renhou,proto3,enum=mahjong.base.Limit" json:"renhou,omitempty"`
	// No tsumo 2 fu for rinshan in jpmla
	RinshanFu bool `protobuf:"varint,7,opt,name=rinshan_fu,json=rinshanFu,proto3" json:"rinshan_fu,omitempty"`
	// Green required for ryuuiisou yakuman in jpmla
	GreenRequired bool `protobuf:"varint,8,opt,name=green_required,json=greenRequired,proto3" json:"green_required,omitempty"`
	// contains filtered or unexported fields
}

func (*Yaku) Descriptor deprecated

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

Deprecated: Use Yaku.ProtoReflect.Descriptor instead.

func (*Yaku) GetAkaDora

func (x *Yaku) GetAkaDora() *base.Instances

func (*Yaku) GetGreenRequired

func (x *Yaku) GetGreenRequired() bool

func (*Yaku) GetHaiteiFromLiveOnly

func (x *Yaku) GetHaiteiFromLiveOnly() bool

func (*Yaku) GetIpatsu

func (x *Yaku) GetIpatsu() bool

func (*Yaku) GetOpenTanyao

func (x *Yaku) GetOpenTanyao() bool

func (*Yaku) GetRenhou

func (x *Yaku) GetRenhou() base.Limit

func (*Yaku) GetRinshanFu

func (x *Yaku) GetRinshanFu() bool

func (*Yaku) GetUra

func (x *Yaku) GetUra() bool

func (*Yaku) ProtoMessage

func (*Yaku) ProtoMessage()

func (*Yaku) ProtoReflect

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

func (*Yaku) Reset

func (x *Yaku) Reset()

func (*Yaku) String

func (x *Yaku) String() string

Jump to

Keyboard shortcuts

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