public void SellProperty(IProperty property) { ReceiveCash(property.CalculateTotalValue()); // player receives full or half value if mortgaged property.SetOwner(null); // property is unowned property.Unmortgage(); // ensures property is always unmortgaged after sale propertiesOwned.Remove(property); // property removed from player's possession // if station or utility, update variables if (property.GetType() == typeof(Station)) { stations--; } else if (property.GetType() == typeof(Utility)) { utilities--; } }