Skip to content

Commit

Permalink
Fixing filter to include players
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Murphy committed Apr 7, 2018
1 parent 0f86b78 commit e516f8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func (g Game) Filter(ctx context.Context) Game {
g.Draw = maskedPolicies(len(g.Draw))
g.Discard = maskedPolicies(len(g.Discard))
//Filter the player roles
np := []Player{}
nps := []Player{}
for _, p := range g.Players {
np := Player{
ID: p.ID,
Expand All @@ -33,8 +33,9 @@ func (g Game) Filter(ctx context.Context) Game {
np.Party = p.Party
np.Role = p.Role
}
nps = append(nps, np)
}
g.Players = np
g.Players = nps
//Filter the round votes
if g.Round.State == RoundStateVoting {
vs := make([]Vote, len(g.Round.Votes))
Expand Down

0 comments on commit e516f8b

Please sign in to comment.