Documentation ¶
Index ¶
- func Add(key string, rdata interfacer.IDesk)
- func Close()
- func Del(key string)
- func Exist(key string) bool
- func GenInvitecode(count int) (s string)
- func Get(key string) interfacer.IDesk
- func Len() int
- func NewDesk(data *DeskData) interfacer.IDesk
- type Desk
- func (t *Desk) Broadcasts(msg interfacer.IProto)
- func (t *Desk) Closed(ok bool)
- func (t *Desk) Diceing() bool
- func (t *Desk) Discard(seat uint32, card byte, ok bool) int32
- func (t *Desk) DiscardHu(card byte, cs []byte, ch, ps, ks []uint32, wildcard byte, seat uint32) int64
- func (t *Desk) DrawDetect(card byte, cs []byte, ch, ps, ks []uint32, wildcard byte, seat uint32) int64
- func (t *Desk) Enter(p interfacer.IPlayer) int32
- func (t *Desk) MaiZi(seat, count uint32) int32
- func (t *Desk) Offline(seat uint32, status bool)
- func (t *Desk) Operate(card uint32, value int64, seat uint32) int32
- func (t *Desk) Readying(seat uint32, ready bool) int32
- func (t *Desk) SetCheat(handcards [][]byte, leftcards []byte, wildcard byte)
- func (t *Desk) ToString() string
- func (t *Desk) Vote(ok bool, seat, vote uint32) int32
- type DeskData
- type Player
- func (this *Player) ClearRoom()
- func (this *Player) ConverDataUser() *protocol.UserData
- func (this *Player) ConverProtoUser() *protocol.ProtoUser
- func (this *Player) GetConn() interfacer.IConn
- func (this *Player) GetInviteCode() string
- func (this *Player) GetPlatform() uint32
- func (this *Player) GetRoomCard() uint32
- func (this *Player) GetRoomID() uint32
- func (this *Player) GetRoomType() uint32
- func (this *Player) GetSeat() uint32
- func (this *Player) GetUserid() string
- func (this *Player) Send(value interfacer.IProto)
- func (this *Player) SetAuth(auth string)
- func (this *Player) SetConn(value interfacer.IConn)
- func (this *Player) SetEmail(email string)
- func (this *Player) SetIP(ip uint32)
- func (this *Player) SetLongitudeLatitude(longitude, latitude string)
- func (this *Player) SetPwd(pwd string)
- func (this *Player) SetRoom(rid uint32, seat uint32, invitecode string)
- func (this *Player) SetRoomCard(value uint32)
- func (this *Player) SetStatus(status uint32)
- func (this *Player) SetUserid(id string)
- type RoomInfoResp
- type SocialRooms
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Desk ¶
房间牌桌数据结构
func (*Desk) DiscardHu ¶
func (t *Desk) DiscardHu(card byte, cs []byte, ch, ps, ks []uint32, wildcard byte, seat uint32) int64
打牌检测,胡牌, 接炮胡检测
func (*Desk) DrawDetect ¶
func (t *Desk) DrawDetect(card byte, cs []byte, ch, ps, ks []uint32, wildcard byte, seat uint32) int64
摸牌检测,胡牌/暗杠/补杠
type DeskData ¶
type DeskData struct { Rid uint32 //房间ID Cid string //房间创建人 Expire uint32 //牌局设定的过期时间 Code string //房间邀请码 Round uint32 // 总牌局数 Ante uint32 //私人房底分 Cost uint32 //创建消耗 CTime uint32 //创建时间 Score map[string]int32 //私人局用户战绩积分 MaiZi bool // 是否买子 }
func NewDeskData ¶
func (*DeskData) Convert ¶
func (this *DeskData) Convert() *data.CreateRoomRecord
type Player ¶
用户的全部数据,服务器存取专用
func (*Player) ClearRoom ¶
func (this *Player) ClearRoom()
---------------------------房间属性---------------------------------
func (*Player) ConverDataUser ¶
func (*Player) ConverProtoUser ¶
func (*Player) GetConn ¶
func (this *Player) GetConn() interfacer.IConn
func (*Player) GetInviteCode ¶
func (*Player) GetPlatform ¶
func (*Player) GetRoomCard ¶
func (*Player) GetRoomType ¶
func (*Player) Send ¶
func (this *Player) Send(value interfacer.IProto)
func (*Player) SetConn ¶
func (this *Player) SetConn(value interfacer.IConn)
func (*Player) SetLongitudeLatitude ¶
func (*Player) SetRoomCard ¶
type RoomInfoResp ¶
type RoomInfoResp struct { RoomId string `json:"roomid"` // 房间号(邀请码) Ids map[uint32]string `json:"ids"` // 玩家的id Roomcards map[uint32]uint32 `json:"roomcards"` // 玩家的房卡 OutCards map[uint32][]uint32 `json:"outCards"` //海底牌 PongCards map[uint32][]uint32 `json:"pongCards"` //碰牌 KongCards map[uint32][]uint32 `json:"kongCards"` //杠牌 ChowCards map[uint32][]uint32 `json:"chowCards"` //吃牌(8bit-8-8) HandCards map[uint32][]uint32 `json:"handCards"` //手牌 Maizi map[uint32]uint32 `json:"maizi"` //买子 Offline map[uint32]bool `json:"offline"` // true:离线,false:上线 Data *DeskData `json:"data"` //房间类型基础数据 Dealer uint32 `json:"dealer"` //庄家的座位 Dice uint32 `json:"dice"` //骰子 Cards []uint32 `json:"cards"` //没摸起的海底牌 LianCount uint32 `json:"lianCount"` // 连庄数 Round uint32 `json:"round"` // 打牌局数 Opt map[uint32]int64 `json:"opt"` // 玩家吃碰杠胡掩码 LuckyCard uint32 `json:"luckyCard"` //本局的财神牌值 Discard uint32 `json:"discard"` //出牌 Draw uint32 `json:"draw"` //摸牌 Seat uint32 `json:"seat"` //当前摸牌|出牌位置 Operate int `json:"operate"` //操作状态 }
type SocialRooms ¶
牌桌列表结构
Click to show internal directories.
Click to hide internal directories.