예제 #1
0
        public void Rendita(Giocatore Pagante)
        {
            if (Proprietario != null && Proprietario != Pagante)
            {
                int Quantita = 0;
                if (!Speciale)
                {
                    Quantita = Costo / 4;
                }

                else if (Colore == Brushes.Black)
                {
                    foreach (Proprieta P in Proprietario.Proprieta)
                    {
                        if (P.Speciale && P.Colore == Brushes.Black)
                        {
                            Quantita += Costo / 4;
                        }
                    }
                }

                Proprietario.Soldi += Quantita;
                Pagante.Soldi      -= Quantita;
            }
        }
예제 #2
0
 public Proprieta(Brush Col, string N, int C, bool S) : base(Col, N)
 {
     Costo        = C;
     Speciale     = S;
     Proprietario = null;
     Ipotecato    = false;
     Strutture    = new List <Struttura>();
 }