Esempio n. 1
0
        public Main_Class()
        {
            var Seeds  = new Item_Cost("One pack of Seeds", 1.2M);
            var Jewels = new Item_Cost("One small bag of Jewels", 3.4M);
            var Spices = new Item_Cost("One pack of Spices", 750M);
            var Rice   = new Item_Cost("One pack of Rice", 500M);
            var Shoes  = new Item_Cost("One pack of Shoes", 21M);



            //earth
            locations.Add(
                new Location_Destination("Earth", 0, 0, new List <Item_Cost>()
            {
                Spices, Jewels
            }));


            //Alpha Centauri 3
            locations.Add(
                new Location_Destination("Alpha Centauri 3", 3.09006, 3.09006, new List <Item_Cost>()
            {
                Spices, Seeds
            }, (decimal).5));

            //Vulcan
            locations.Add(
                new Location_Destination("Vulcan", 11.31371, 11.31371, new List <Item_Cost>()
            {
                Rice, Shoes, Seeds
            }, (decimal)1.6));

            //Risa
            locations.Add(
                new Location_Destination("Risa", 55.86144, 55.86144, new List <Item_Cost>()
            {
                Jewels, Shoes, Rice
            }, (decimal)2.35));


            //Nibiru
            locations.Add(
                new Location_Destination("Nibiru", 353.55339, 353.55339, new List <Item_Cost>()
            {
                Shoes, Jewels, Seeds
            }, (decimal)11.31371));

            Traveler = new Characters(locations[0]);
        }
Esempio n. 2
0
 public decimal CostOf(Item_Cost item) => item.cost * TradeCost;
Esempio n. 3
0
 public void SellItem(Item_Cost item)
 {
     money += location.CostOf(item);
     inventory.Remove(item);
 }
Esempio n. 4
0
 public void BuyItem(Item_Cost item)
 {
     money -= location.CostOf(item);
     inventory.Add(item);
 }