diff options
| author | ewy <ewy0@protonmail.com> | 2026-09-22 15:05:51 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-09-22 15:05:51 +0200 |
| commit | 3eacf89dded0121d2a50fb01dec5d8ccbfbbe4ee (patch) | |
| tree | bce32fd935807c2d5a0daaee76d9a75bdc27f99c /engine/player.go | |
| parent | 83b2f2e9922f46fe46fd5330e6b38c66d1483ade (diff) | |
naive auth
Diffstat (limited to 'engine/player.go')
| -rw-r--r-- | engine/player.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/engine/player.go b/engine/player.go index eb7ac49..a4f7c35 100644 --- a/engine/player.go +++ b/engine/player.go @@ -13,7 +13,15 @@ type Player struct { Hand Stack MasterDeck Stack DrawPile Stack - Ultimates []*Card + Ultimates []IsCard + Character *Character + Cookie string +} + +func (p *Player) SetCharacter(c *Character) { + p.Character = c + p.MasterDeck = c.Cards + p.Ultimates = c.Ultimates } func (p *Player) Opponent(g *Game) *Player { @@ -41,3 +49,9 @@ func NewPlayer(g *Game) *Player { p.propagate(g) return p } + +func (p *Player) Hide() { + p.MasterDeck = p.MasterDeck.Hidden() + p.Hand = p.Hand.Hidden() + p.DrawPile = p.DrawPile.Hidden() +} |
