public Event execute(Match match) {
MatchState state = match.getState();
if (state != MatchState.started)
throw new IllegalStateException(state.toString());
AssignYellowCardEvent assignYellowCardEvent = new AssignYellowCardEvent(this.getPlayerModel());
if (hasYellowCard(match)) {
Event redCardEvent = assignRedCard(match);
assignYellowCardEvent.setSucceedingEvent(redCardEvent);
match.addAssignedRedCard(playerModel);
}
match.addAssignedYellowCard(playerModel);
return assignYellowCardEvent;