Documentation ¶
Index ¶
- Constants
- Variables
- func IntList(val string) []int
- func MoneyToInt(in score.Money) int
- func StringList(val string) []string
- type Agari
- type CallType
- type Called
- type CalledList
- type DrawType
- type FinalScoreChange
- type FinalScoreChanges
- type Float
- type Hands
- type Init
- type LobbyRules
- type Meld
- type MeldChi
- type MeldKan
- type MeldPon
- type MeldType
- type Melds
- type Opponent
- type Ryuukyoku
- type Score
- type ScoreChange
- type ScoreChanges
- type Scores
- type Seed
- type Sex
- type TableStatus
- type UserList
- type Yaku
- type YakuRecord
- type Yakuman
- type Yakumans
- type Yakus
Constants ¶
View Source
const ( MaskDanAll LobbyRules = FlagDan1 | FlagDan2 MaskDanKu LobbyRules = 0 MaskDan1 = FlagDan1 MaskDan2 = FlagDan2 MaskDanPhoenix = MaskDan1 | MaskDan2 RulesDzjanso LobbyRules = 0x0841 )
Variables ¶
View Source
var DrawMap = map[string]DrawType{ "": DrawEnd, "yao9": Draw9, "reach4": DrawReach4, "ron3": DrawRon3, "kan4": DrawKan4, "kaze4": DrawWind4, "nm": DrawNagashi, }
View Source
var ReverseDrawMap = func() map[DrawType]string { ret := make(map[DrawType]string, len(DrawMap)) for k, v := range DrawMap { ret[v] = k } return ret }()
View Source
var ReverseYakuMap = func() map[yaku.Yaku]Yaku { ret := make(map[yaku.Yaku]Yaku, len(YakuMap)) for k, v := range YakuMap { ret[v] = k } return ret }()
View Source
var ReverseYakumanMap = func() map[yaku.Yakuman]Yakuman { ret := make(map[yaku.Yakuman]Yakuman, len(YakumanMap)) for k, v := range YakumanMap { ret[v] = k } return ret }()
View Source
var YakuMap = map[Yaku]yaku.Yaku{ 0: yaku.YakuTsumo, 1: yaku.YakuRiichi, 2: yaku.YakuIppatsu, 3: yaku.YakuChankan, 4: yaku.YakuRinshan, 5: yaku.YakuHaitei, 6: yaku.YakuHoutei, 7: yaku.YakuPinfu, 8: yaku.YakuTanyao, 9: yaku.YakuIppeiko, 10: yaku.YakuTonSelf, 11: yaku.YakuNanSelf, 12: yaku.YakuSjaSelf, 13: yaku.YakuPeiSelf, 14: yaku.YakuTonRound, 15: yaku.YakuNanRound, 16: yaku.YakuSjaRound, 17: yaku.YakuPeiRound, 18: yaku.YakuHaku, 19: yaku.YakuHatsu, 20: yaku.YakuChun, 21: yaku.YakuDaburi, 22: yaku.YakuChiitoi, 23: yaku.YakuChanta, 24: yaku.YakuItsuu, 25: yaku.YakuSanshoku, 26: yaku.YakuSanshokuDoukou, 27: yaku.YakuSankantsu, 28: yaku.YakuToitoi, 29: yaku.YakuSanankou, 30: yaku.YakuShousangen, 31: yaku.YakuHonrouto, 32: yaku.YakuRyanpeikou, 33: yaku.YakuJunchan, 34: yaku.YakuHonitsu, 35: yaku.YakuChinitsu, 52: yaku.YakuDora, 53: yaku.YakuUraDora, 54: yaku.YakuAkaDora, }
View Source
var YakumanMap = map[Yakuman]yaku.Yakuman{ 36: yaku.YakumanRenhou, 37: yaku.YakumanTenhou, 38: yaku.YakumanChihou, 39: yaku.YakumanDaisangen, 40: yaku.YakumanSuuankou, 41: yaku.YakumanSuuankouTanki, 42: yaku.YakumanTsuiisou, 43: yaku.YakumanRyuuiisou, 44: yaku.YakumanChinrouto, 45: yaku.YakumanChuurenpooto, 46: yaku.YakumanChuurenpooto9, 47: yaku.YakumanKokushi, 48: yaku.YakumanKokushi13, 49: yaku.YakumanDaisuushi, 50: yaku.YakumanShousuushi, 51: yaku.YakumanSuukantsu, }
Functions ¶
func MoneyToInt ¶
func StringList ¶
Types ¶
type Agari ¶
type Agari struct { Who Opponent From Opponent Pao *Opponent Status TableStatus Score Score FinalScores FinalScoreChanges Changes ScoreChanges Hand tile.Instances DoraIndicators tile.Instances UraIndicators tile.Instances WinTile tile.Instance Yakus Yakus Yakumans Yakumans Melds Melds // TODO: research Ratio string Chips []int }
type Called ¶
type Called struct { Type CallType Opponent Opponent Tiles tile.Instances Called tile.Instance Upgraded tile.Instance // Core representation of meld for tempai calculator Core calc.Meld }
func DecodeCalled ¶
type CalledList ¶
type CalledList []*Called
func (CalledList) Add ¶
func (cl CalledList) Add(x compact.Instances)
func (CalledList) Core ¶
func (cl CalledList) Core() calc.Melds
type FinalScoreChange ¶
func (*FinalScoreChange) DiffMoney ¶
func (sc *FinalScoreChange) DiffMoney() score.Money
func (*FinalScoreChange) ScoreMoney ¶
func (sc *FinalScoreChange) ScoreMoney() score.Money
type FinalScoreChanges ¶
type FinalScoreChanges []FinalScoreChange
type LobbyRules ¶
type LobbyRules int
const ( FlagOnline LobbyRules = 1 << iota FlagNoAkkas FlagNoKuitan FlagHanchan Flag3Man FlagDan1 FlagFast FlagDan2 FlagEnd )
func (LobbyRules) Check ¶
func (r LobbyRules) Check(f LobbyRules) bool
func (LobbyRules) DebugString ¶
func (r LobbyRules) DebugString() string
func (LobbyRules) Extract ¶
func (r LobbyRules) Extract(mask LobbyRules) LobbyRules
func (LobbyRules) String ¶
func (r LobbyRules) String() string
type Melds ¶
type Melds []Meld
func EncodeCalledList ¶
func EncodeCalledList(in CalledList) Melds
func (Melds) Decode ¶
func (m Melds) Decode() CalledList
type Ryuukyoku ¶
type Ryuukyoku struct { DrawType DrawType TableStatus TableStatus ScoreChanges ScoreChanges Finals FinalScoreChanges Hands Hands Ratio []int }
type ScoreChange ¶
func (*ScoreChange) DiffMoney ¶
func (sc *ScoreChange) DiffMoney() score.Money
func (*ScoreChange) ScoreMoney ¶
func (sc *ScoreChange) ScoreMoney() score.Money
type ScoreChanges ¶
type ScoreChanges []ScoreChange
func (ScoreChanges) ToFinal ¶
func (sc ScoreChanges) ToFinal(isInt bool) FinalScoreChanges
type TableStatus ¶
type TableStatus struct { Honba score.Honba Sticks score.RiichiSticks }
type UserList ¶
type YakuRecord ¶
Click to show internal directories.
Click to hide internal directories.