Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
        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);
        }