From e516f8be9ae25f3968fbeb6652a76e3d35e2d847 Mon Sep 17 00:00:00 2001 From: Sean Murphy Date: Sat, 7 Apr 2018 15:10:33 -0600 Subject: [PATCH] Fixing filter to include players --- filter.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/filter.go b/filter.go index 8b5cb62..a66a2e7 100644 --- a/filter.go +++ b/filter.go @@ -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, @@ -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))