a
This commit is contained in:
parent
d61129dfe5
commit
7b54ed8e53
3 changed files with 21 additions and 0 deletions
|
|
@ -585,6 +585,10 @@ func (g *Game) buildState(p *Player, chosenSuit Suit) GameScriptState {
|
|||
copy(h, pl.Hand)
|
||||
hands[i] = h
|
||||
}
|
||||
discardCopy := make([]Card, len(g.DiscardPile))
|
||||
copy(discardCopy, g.DiscardPile)
|
||||
deckCopy := make([]Card, len(g.Deck))
|
||||
copy(deckCopy, g.Deck)
|
||||
|
||||
return GameScriptState{
|
||||
ActiveSuit: g.ActiveSuit,
|
||||
|
|
@ -593,6 +597,8 @@ func (g *Game) buildState(p *Player, chosenSuit Suit) GameScriptState {
|
|||
ChosenSuit: chosenSuit,
|
||||
Hand: handCopy,
|
||||
PlayerHands: hands,
|
||||
DiscardPile: discardCopy,
|
||||
Deck: deckCopy,
|
||||
CurrentPlayerIndex: g.CurrentPlayer,
|
||||
PlayerCount: len(g.Players),
|
||||
HandCounts: counts,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue