Skip to content

Commit

Permalink
Fix multiple_card game event being ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Jul 18, 2024
1 parent bd0471d commit 0937b2e
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions internal/app/statemachine/change_cards.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,14 @@ func activeYellowCards(cards []*state.YellowCard) (count int32) {

// multipleYellowCardsChange creates a multiple cards event change
func (s *StateMachine) multipleYellowCardsChange(byTeam state.Team) *Change {
eventType := state.GameEvent_MULTIPLE_CARDS
return &Change{
Change: &Change_AddGameEventChange{
AddGameEventChange: &Change_AddGameEvent{
GameEvent: &state.GameEvent{
Type: &eventType,
Event: &state.GameEvent_MultipleCards_{
MultipleCards: &state.GameEvent_MultipleCards{
ByTeam: &byTeam,
},
},
return createGameEventChange(
state.GameEvent_MULTIPLE_CARDS,
&state.GameEvent{
Event: &state.GameEvent_MultipleCards_{
MultipleCards: &state.GameEvent_MultipleCards{
ByTeam: &byTeam,
},
},
},
}
)
}

0 comments on commit 0937b2e

Please sign in to comment.