Skip to content

Commit

Permalink
fix: ensuring array is never null
Browse files Browse the repository at this point in the history
  • Loading branch information
daithihearn committed Jan 28, 2024
1 parent a5627b9 commit 9097589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/game/game-methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ func (g *Game) Play(id string, card CardName) error {
}

// Remove the card from the player's hand
var cards []CardName
cards := make([]CardName, 0)
for _, c := range state.Cards {
if c != card {
cards = append(cards, c)
Expand Down

0 comments on commit 9097589

Please sign in to comment.