コード例 #1
0
 public static void Initialize()
 {
     player         = new Player("Default", 10);
     numOfHoursLeft = 16;
     numOfHoursPast = 0;
     table          = new AlchymyTable(player);
 }
コード例 #2
0
        public void priceTest()
        {
            Player            player      = new Player("", 500);
            Ingredient        ingredient1 = new Ingredient("Flaming Tail", "beast.png", 700, Rarity.Uncommon, (AlchymicEffect)8448);  //0010000100000000
            Ingredient        ingredient2 = new Ingredient("Koro Tentacle", "fish.png", 3500, Rarity.Godlike, (AlchymicEffect)12560); //0011000100010000
            Ingredient        ingredient3 = new Ingredient("Twisted Root", "plant.png", 200, Rarity.Inferior, (AlchymicEffect)30);    //0000000000011110
            List <Ingredient> ingredients = new List <Ingredient>();
            AlchymicEffect    effects     = 0;

            ingredients.Add(ingredient1);
            ingredients.Add(ingredient2);
            ingredients.Add(ingredient3);

            Potion potion = new Potion("", "potion.png", ((ingredient1.price + ingredient2.price + ingredient3.price) * (int)Rarity.Rubbish), Rarity.Rubbish, ingredients, effects);

            AlchymyTable table = new AlchymyTable(player, ingredient1, ingredient2, ingredient3, potion);

            table.craftPotion();
            //i1    0010000100000000
            //i2    0011000100010000
            //i3    0000000000011110
            //result0010000100010000
            Assert.AreEqual((4400 * 7), table.Potion.price);
        }