39 lines
581 B
Lua
39 lines
581 B
Lua
--玩家数据对象
|
|
|
|
|
|
local Player ={
|
|
-- 玩家对应的User对象
|
|
self_user = nil,
|
|
-- 网络状态 1 在线 0 离线
|
|
line_state = 1,
|
|
-- 座位号
|
|
seat = 0,
|
|
-- 是否准备
|
|
ready = false,
|
|
-- 当前局积分
|
|
curren_score = 0,
|
|
-- 总积分
|
|
total_score = 0,
|
|
-- 托管
|
|
entrust = false,
|
|
}
|
|
---
|
|
-- @type Player
|
|
local M = Player
|
|
|
|
|
|
|
|
--- Create a new Player
|
|
function Player.new()
|
|
local self = {}
|
|
setmetatable(self, {__index = M})
|
|
self.hand_cards = {}
|
|
return self
|
|
end
|
|
|
|
-- 清理玩家数据
|
|
function M:Clear()
|
|
end
|
|
|
|
return M
|