Ejemplo n.º 1
0
        private static void SachelTest()
        {
            Satchel mySatchel = new Satchel(10);

            var item1 = new Mace();
            var item2 = new Potion();

            mySatchel.AddItem(item1);
            mySatchel.AddItem(item2);

            mySatchel.DisplayContents();
        }
Ejemplo n.º 2
0
        private static void SackTest()
        {
            Sack sack = new Sack(4);

            var item1 = new Mace();
            var item2 = new Potion();

            sack.AddItem(item1);
            sack.AddItem(item2);

            sack.DisplayContents();
        }
Ejemplo n.º 3
0
        private static void RemoveTest()
        {
            Satchel mySatchel = new Satchel(10);

            var item1 = new Mace();
            var item2 = new Potion();
            var item3 = new Mace();

            mySatchel.AddItem(item1);
            mySatchel.AddItem(item2);
            mySatchel.AddItem(item3);

            mySatchel.DisplayContents();

            var removed = mySatchel.RemoveItem();
            Console.WriteLine("Removed {0}", removed.Name);

            mySatchel.DisplayContents();
        }