Ejemplo n.º 1
0
        /// <summary>
        /// Изъять выбранного игрока. Возвращает игрока
        /// </summary>
        /// <returns></returns>
        public PlayerViewModel WithdrawSelectedPlayer()
        {
            PlayerViewModel player = SelectedActivePlayer;

            ActivePlayersVM.Remove(SelectedActivePlayer);
            return(player);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Убрать полевых игроков. Возвращает список полевых игроков
        /// </summary>
        /// <returns></returns>
        public List <PlayerViewModel> FieldersRemove()
        {
            List <PlayerViewModel> playersInField = new List <PlayerViewModel>();

            foreach (PlayerViewModel plVM in ActivePlayersVM.Players)
            {
                if (plVM.CurrentPosition != FootballPosition.Default)
                {
                    playersInField.Add(plVM);
                }
            }

            foreach (PlayerViewModel plVM in playersInField)
            {
                ActivePlayersVM.Remove(plVM);
            }

            return(playersInField);
        }