model

package
v0.0.0-...-ca6fd01 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ai0 = AiNum(0)
	Ai2 = AiNum(1)
	Ai3 = AiNum(2)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AiNum

type AiNum int

func (AiNum) NeedAi

func (a AiNum) NeedAi() int

func (AiNum) NeedUser

func (a AiNum) NeedUser() int

func (AiNum) String

func (a AiNum) String() string

func (AiNum) Valid

func (a AiNum) Valid() bool

type CPointEntry

type CPointEntry struct {
	Username string
	CPoint   int
	// contains filtered or unexported fields
}

func (*CPointEntry) AfterQuery

func (cpe *CPointEntry) AfterQuery(db orm.DB) error

type Culti

type Culti struct {
	UserId         Uid
	GirlId         Gid
	Ranks          []int `pg:",array"`
	AvgPoint       float64
	ATop           int
	ALast          int
	Round          int
	Win            int
	Gun            int
	Bark           int
	Riichi         int
	WinPoint       float64
	GunPoint       float64
	BarkPoint      float64
	RiichiPoint    float64
	Ready          int
	ReadyTurn      float64
	WinTurn        float64
	YakuRci        int
	YakuIpt        int
	YakuTmo        int
	YakuTny        int
	YakuPnf        int
	YakuY1y        int
	YakuY2y        int
	YakuY3y        int
	YakuJk1        int
	YakuJk2        int
	YakuJk3        int
	YakuJk4        int
	YakuBk1        int
	YakuBk2        int
	YakuBk3        int
	YakuBk4        int
	YakuIpk        int
	YakuRns        int
	YakuHai        int
	YakuHou        int
	YakuCkn        int
	YakuSs1        int
	YakuIt1        int
	YakuCt1        int
	YakuWri        int
	YakuSs2        int
	YakuIt2        int
	YakuCt2        int
	YakuToi        int
	YakuCtt        int
	YakuSak        int
	YakuSkt        int
	YakuStk        int
	YakuHrt        int
	YakuS3g        int
	YakuH1t        int
	YakuJc2        int
	YakuMnh        int
	YakuJc3        int
	YakuRpk        int
	YakuC1t        int
	YakuMnc        int
	YakuX13        int
	YakuXd3        int
	YakuX4a        int
	YakuXt1        int
	YakuXs4        int
	YakuXd4        int
	YakuXcr        int
	YakuXr1        int
	YakuXth        int
	YakuXch        int
	YakuX4k        int
	YakuX9r        int
	YakuW13        int
	YakuW4a        int
	YakuW9r        int
	Kzeykm         int
	HanRci         float64
	HanIpt         float64
	HanTmo         float64
	HanTny         float64
	HanPnf         float64
	HanY1y         float64
	HanY2y         float64
	HanY3y         float64
	HanJk1         float64
	HanJk2         float64
	HanJk3         float64
	HanJk4         float64
	HanBk1         float64
	HanBk2         float64
	HanBk3         float64
	HanBk4         float64
	HanIpk         float64
	HanRns         float64
	HanHai         float64
	HanHou         float64
	HanCkn         float64
	HanSs1         float64
	HanIt1         float64
	HanCt1         float64
	HanWri         float64
	HanSs2         float64
	HanIt2         float64
	HanCt2         float64
	HanToi         float64
	HanCtt         float64
	HanSak         float64
	HanSkt         float64
	HanStk         float64
	HanHrt         float64
	HanS3g         float64
	HanH1t         float64
	HanJc2         float64
	HanMnh         float64
	HanJc3         float64
	HanRpk         float64
	HanC1t         float64
	HanMnc         float64
	YakuDora       int
	YakuUradora    int
	YakuAkadora    int
	YakuKandora    int
	YakuKanuradora int
	// contains filtered or unexported fields
}

cultivation

type EndTableStat

type EndTableStat struct {
	Ranks           [4]int
	Points          [4]int
	ATop            bool
	ALast           bool
	Round           int
	Wins            [4]int
	Guns            [4]int
	Barks           [4]int
	Riichis         [4]int
	WinSumPoints    [4]int
	GunSumPoints    [4]int
	BarkSumPoints   [4]int
	RiichiSumPoints [4]int
	ReadySumTurns   [4]int
	Readys          [4]int
	WinSumTurns     [4]int
	Yakus           [4]map[string]int
	SumHans         [4]map[string]int
	Kzeykms         [4]int
	Replay          map[string]interface{}
}

type FoodChange

type FoodChange struct {
	Delta  int
	Reason string
}

type Gid

type Gid int

girl id, signed-int for compatibility to libsaki

type Girl

type Girl struct {
	Id Gid
	Lpr
}

deprecated

type GirlKey

type GirlKey struct {
	Id   Gid    `json:"id"`
	Path string `json:"path"`
}

type Lpr

type Lpr struct {
	Level  int
	Pt     int
	Rating float64
}

level, pt, and rating

type MatchResult

type MatchResult struct {
	Id     int // id of the result set
	RuleId RuleId
	Users  [4]User
}

func (*MatchResult) RightPers

func (mr *MatchResult) RightPers() *MatchResult

rotate perspective

func (*MatchResult) Uids

func (mr *MatchResult) Uids() [4]Uid

type MatchState

type MatchState struct {
	Wait int
	Play int
}

type Rid

type Rid int

type Room

type Room struct {
	Id    Rid
	AiNum AiNum
	Users []User
	Gids  []Gid
	Bans  []Gid
}

func (*Room) FillAi

func (r *Room) FillAi(gids []Gid)

func (*Room) Four

func (r *Room) Four() bool

type RuleId

type RuleId int
const (
	RuleFourDoges   RuleId = 0
	RuleClassic1In2 RuleId = 1
	RuleMax         RuleId = 2
)

func (RuleId) Valid

func (ri RuleId) Valid() bool

type Task

type Task struct {
	Id         int `sql:"task_id,pk"`
	Title      string
	Content    string
	State      TaskState
	AssigneeId Uid
	Assignee   *User
	CPoint     int
}

type TaskState

type TaskState int
const (
	TaskStateToDo    TaskState = 0
	TaskStateDoing   TaskState = 1
	TaskStateToCheck TaskState = 2
	TaskStateClosed  TaskState = 3
)

type Uid

type Uid uint

user id

const (
	UidSys Uid = 500
	UidAi1 Uid = 501
	UidAi2 Uid = 502
)

func (Uid) IsBot

func (uid Uid) IsBot() bool

func (Uid) IsHuman

func (uid Uid) IsHuman() bool

type User

type User struct {
	Id        Uid `sql:"user_id,pk"`
	Username  string
	CPoint    int
	GotFoodAt *time.Time
	Food      int
}

func (*User) AfterQuery

func (user *User) AfterQuery(db orm.DB) error

Jump to

Keyboard shortcuts

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