コード例 #1
0
ファイル: Asta.cs プロジェクト: LorenzoPiazza/MyFantalega
        public Asta(int idAsta, List <Squadra> squadre, Giocatore giocatore)
        {
            _idAsta              = idAsta;
            this.UltimaOfferta   = giocatore.QuotazioneIniziale;
            this.UltimoOfferente = null;
            this.Squadre         = squadre;
            this.Giocatore       = giocatore;

            _squadre = new List <Squadra>();
            _squadre = squadre;
        }
コード例 #2
0
ファイル: Stato.cs プロジェクト: LorenzoPiazza/MyFantalega
 public static Stato DeterminaStato(Giocatore giocatore)
 {
     if (giocatore.PrezzoAcquisto > 0 && (giocatore.NomeSquadra != null || !giocatore.NomeSquadra.Equals("ListaSvincolati")))
     {
         return(new Acquistato());
     }
     else
     {
         return(new Libero());
     }
 }
コード例 #3
0
        public Boolean AggiungiGiocatore(Giocatore toAdd)
        {
            if (toAdd == null)
            {
                return(false);
            }

            if (_giocatori.Contains(toAdd))
            {
                return(false);
            }

            _giocatori.Add(toAdd);
            return(true);
        }
コード例 #4
0
        public Boolean RimuoviGiocatore(Giocatore toRemove)
        {
            int count = 0;

            if (toRemove == null)
            {
                return(false);
            }
            for (int i = 0; i < this.Giocatori.Count; i++)
            {
                if (this.Giocatori[i].Nome.Equals(toRemove.Nome))
                {
                    count = i;
                }
            }
            _giocatori.RemoveAt(count);
            return(true);
        }
コード例 #5
0
ファイル: Asta.cs プロジェクト: LorenzoPiazza/MyFantalega
 public Asta()
 {
     _squadre             = new List <Squadra>();
     this.UltimoOfferente = null;
     _giocatore           = null;
 }