// Functions //
 public Token(Player owner)
 {
     this.owner = owner;
 }
Exemple #2
0
 public bool Upgrade(Player owner)
 {
     if(isUpgradable)
     {
         owner.money -= tollBase;
         level += 1;
         return true;
     }
     else
     {
         return false;
     }
 }
Exemple #3
0
 public void Buy(Player player)
 {
     player.money -= price;
     ownerName = player.username;
     player.landList.Add(this);
 }
Exemple #4
0
 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");
 }