2023-04-09 13:35:35 +08:00
|
|
|
-- SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2022-09-14 13:01:10 +08:00
|
|
|
---@class ClientPlayer: Player
|
2023-03-26 17:32:45 +08:00
|
|
|
---@field public player fk.Player
|
|
|
|
---@field public known_cards integer[]
|
|
|
|
---@field public global_known_cards integer[]
|
2022-03-28 22:24:30 +08:00
|
|
|
local ClientPlayer = Player:subclass("ClientPlayer")
|
2022-03-25 12:28:07 +08:00
|
|
|
|
2022-03-28 22:24:30 +08:00
|
|
|
function ClientPlayer:initialize(cp)
|
2022-09-14 13:01:10 +08:00
|
|
|
Player.initialize(self)
|
|
|
|
self.id = cp:getId()
|
2022-04-30 15:27:56 +08:00
|
|
|
self.player = cp
|
2022-09-14 13:01:10 +08:00
|
|
|
self.known_cards = {} -- you know he/she have this card, but not shown
|
|
|
|
self.global_known_cards = {} -- card that visible to all players
|
|
|
|
end
|
|
|
|
|
2022-03-28 22:24:30 +08:00
|
|
|
return ClientPlayer
|