2023-04-09 05:35:35 +00:00
|
|
|
-- SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2022-09-14 05:01:10 +00:00
|
|
|
---@class ClientPlayer: Player
|
2023-03-26 09:32:45 +00:00
|
|
|
---@field public player fk.Player
|
|
|
|
---@field public known_cards integer[]
|
|
|
|
---@field public global_known_cards integer[]
|
2022-03-28 14:24:30 +00:00
|
|
|
local ClientPlayer = Player:subclass("ClientPlayer")
|
2022-03-25 04:28:07 +00:00
|
|
|
|
2022-03-28 14:24:30 +00:00
|
|
|
function ClientPlayer:initialize(cp)
|
2022-09-14 05:01:10 +00:00
|
|
|
Player.initialize(self)
|
|
|
|
self.id = cp:getId()
|
2022-04-30 07:27:56 +00:00
|
|
|
self.player = cp
|
2022-09-14 05:01:10 +00: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 14:24:30 +00:00
|
|
|
return ClientPlayer
|