player | browse send | backend do | back-end send | browse do |
入座 | { event:’入座’, person: player id, table: table id, seat: ‘B’ } | { event:’入座’, seat: ‘B’, person: name, avatar: url } | 在seat上显示name和avatar | |
离座 | { event:’ 离座 ‘, person: player id, table: table id, seat: ‘B’ } | { event:’ 离座 ‘, seat: ‘B’ } | 在seat上显示无人状态 | |
开始打牌 | { event:’开始 ‘, person: player id } | { event:’开始’, rank: ‘3’ //如果是第一把,rank为0 } | 显示牌局状态 | |
准备抓牌 | { event:’准备抓牌’, seat:’A’ } | 如果用户是seat,提醒抓牌 | ||
抓牌 | { event:’抓牌’, person: player id, } | 找出玩家该抓哪张牌 | { event:’抓牌’, seat:’A’, cards:[‘H2’] } | 显示用户seat抓了card(根据座位有时显示牌,有时不显示) |
亮主牌 | { event:’ 亮主牌’, person: player id, cards:[‘H2’, ‘H2’] } | { event: ‘亮主牌 ‘, seat:’A’, name:’sam’, cards:[‘H2’, ‘H2’] } | 显示用户seat亮主牌 card | |
准备抓底牌 | { event:’准备抓底牌 ‘, seat:’A’ } | 如果用户是seat,提醒抓底牌 | ||
抓底牌 | { event:’抓底牌’, person: player id, } | 找出玩家该抓哪些底牌 | { event:抓底牌’, seat:’A’, cards:[‘H2’, ‘DA’,’DT’,’JR’, ‘RB’, ‘H2’] } | 显示用户seat抓了card(根据座位有时显示牌,有时不显示) |
扣完底牌 | { event: 扣完底牌 ‘, seat:’A’ } | 把所有亮的牌都退回到手上去 | ||
准备出牌 | { event:’ 准备出牌’, seat:’A’ } | 如果用户是seat,提醒出牌 | ||
出牌 | { event:’出牌’, person: player id, cards: [‘H2′,’ H2′] } | { event:’出牌’, seat:’A’, cards: [‘H2’, ‘H2’] status: ” } | 显示用户seat出牌 card | |
一局结束 | { event:’局结束 ‘, status: ” } | 继续 { event:’Ready’, person: player id } 退出 【 离座 】 | ||
打过A | { event:’结束 ‘, status: ” } | 继续 { event:’Ready’, person: player id } 退出 【 离座 】 | ||
发消息 | { event:’chat’, person: player id, message: ‘***’ } | { event:’chat’, person: ‘别名’, message: ‘***’ } | 显示person发消息 |
status: {
score: 比分,比如8:7,前面是坐SEAT A 队的分,A+就是打过A了
rank: 目前打几 [2,3,4,5,6,7,8,9,T,J,Q,K,A]
trumpSuit: 什么是主 [S,H,D,C,N] N无主
firstHand: 谁坐庄,[A, B, C, D, E, F]
point: 目前的分数
}