public static void addPropertyDebt(Player player, TitleDeed titleDeed) { if (!hasPlayer(player)) { UnhandledDebt unhandledDebt = new UnhandledDebt(player); _unhandledDebtList.Add(player, unhandledDebt); } _unhandledDebtList[player].addPropertyDebt(titleDeed); }
public void removeTitleDeed(TitleDeed titleDeed) { if (_inventory.ContainsKey(titleDeed.Name)) { _inventory.Remove(titleDeed.Name); } }
private void purchase(Player player, TitleDeed titleDeed) { if (titleDeed == null) { Irc.Output(Irc.getChannel(), ".fail " + player.Name + " Unpurchaseable property."); } else if (titleDeed.Owner != null) { if (titleDeed.Owner == player) { Irc.Output(Irc.getChannel(), ".fail " + player.Name + " You already own " + titleDeed.Name + "."); } else { Irc.Output(Irc.getChannel(), ".fail " + player.Name + " " + titleDeed.Owner.Name + " already owns " + titleDeed.Name + "."); } } else { if (player.Cash >= titleDeed.Cost) { player.payFlatFee(titleDeed.Cost); player.addTitleDeed(titleDeed); titleDeed.Owner = player; } else { Irc.Output(Irc.getChannel(), ".fail " + player.Name + " insufficient funds"); } } }
public void addTitleDeed(TitleDeed titleDeed) { if (titleDeed != null) { _inventory.Add(titleDeed.Name, titleDeed); Irc.Output(Irc.getChannel(), ".acquired " + _name + " " + (int)titleDeed.Name); } }
public void addPropertyDebt(TitleDeed titleDeed) { if (titleDeed.Mortgaged && (titleDeed.Owner == _player)) { _propertyDebt.Add(titleDeed.Name, titleDeed); } }