private void AddGoals(Match match, Team team, int score) { for (int i = 0; i < score; i++) { match.InitiateAttack(team.Squad.Last()); match.OnShoot(null, ShotResult.Scored); } }
public void Perform(Match match) { Shooter = match.CurrentPlayer; Assistant = match.PreviousPlayer; Opponent = Shooter.Team.Opponent.PickPlayerToConfrontShooter(Shooter); Goalkeeper = Shooter.Team.Opponent.Goalkeeper; ShotResult result = Shooter.TryShoot(Assistant, Opponent, Goalkeeper); match.OnShoot(Opponent, result); ratingAdjuster.OnShoot(Shooter, Assistant, Opponent, Goalkeeper, result); }