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; }
public static Stato DeterminaStato(Giocatore giocatore) { if (giocatore.PrezzoAcquisto > 0 && (giocatore.NomeSquadra != null || !giocatore.NomeSquadra.Equals("ListaSvincolati"))) { return(new Acquistato()); } else { return(new Libero()); } }
public Boolean AggiungiGiocatore(Giocatore toAdd) { if (toAdd == null) { return(false); } if (_giocatori.Contains(toAdd)) { return(false); } _giocatori.Add(toAdd); return(true); }
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); }
public Asta() { _squadre = new List <Squadra>(); this.UltimoOfferente = null; _giocatore = null; }