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