/**
  * pay salary ans triger player updates.
  * 
  * @param SimulationMatch $match
  * @param SimulationTeam $team
  */
 private function _updateTeam(SimulationMatch $match, SimulationTeam $team)
 {
     // debit players salary
     $salary = YouthPlayersDataService::computeSalarySumOfYouthPlayersOfTeam($this->_websoccer, $this->_db, $team->id);
     if ($salary) {
         BankAccountDataService::debitAmount($this->_websoccer, $this->_db, $team->id, $salary, 'youthteam_salarypayment_subject', 'match_salarypayment_sender');
     }
     // update players who played
     if (is_array($team->positionsAndPlayers)) {
         foreach ($team->positionsAndPlayers as $position => $players) {
             foreach ($players as $player) {
                 $this->_updatePlayer($match, $player, TRUE);
             }
         }
     }
     if (is_array($team->removedPlayers)) {
         foreach ($team->removedPlayers as $player) {
             $this->_updatePlayer($match, $player, FALSE);
         }
     }
 }