// Functions // public Token(Player owner) { this.owner = owner; }
public bool Upgrade(Player owner) { if(isUpgradable) { owner.money -= tollBase; level += 1; return true; } else { return false; } }
public void Buy(Player player) { player.money -= price; ownerName = player.username; player.landList.Add(this); }
public void PayToll(Player player, Player owner) { player.money -= toll; owner.money += toll; }
private static void PrintPlayerData(Player player) { Console.WriteLine("Name: " + player.username); Console.WriteLine("Money: " + player.money); Console.Write("Land: "); foreach (Land land in player.landList) { Console.Write("{0}({1}), ", land.name, land.level); } Console.Write("\n"); }