Exemple #1
0
 //This function checks whether this player owns a specific Station or not.
 //returns true if he owns it and false if not.
 public bool IsStationOwned(Station station)
 {
     if (OwnedStations.Contains(station))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
 //This function buys a sepcific station.
 public bool Buy_Station(Station station)
 {
     if (Balance >= station.Price)
     {
         BalanceFeedback = 0;
         OwnedStations.Add(station);
         Balance         -= station.Price;
         BalanceFeedback -= station.Price;
         station.Owned    = true;
         station.Owner    = this;
         return(true);
     }
     else
     {
         return(false);
     }
 }