Esempio n. 1
0
        public void CheckCanAdd(int cost, bool expected)
        {
            var ship = Init(cost);
            var chip = ChipParser.GetChip("System Chip");

            Assert.AreEqual(expected, ship.Chips.IsCanAdd(chip));
        }
Esempio n. 2
0
        public void CantAddChip()
        {
            var ship = Init(0);
            var chip = ChipParser.GetChip("System Chip");

            ship.Chips.Add(chip);
            Assert.AreEqual(0, ship.Chips.GetChips.Count);
        }
Esempio n. 3
0
        public void RemoveChip()
        {
            var ship = Init(100);
            var chip = ChipParser.GetChip("System Chip");

            ship.Chips.Add(chip);
            ship.Chips.Remove(chip);
        }
Esempio n. 4
0
        public void AddAllChips()
        {
            var ship  = Init(100);
            var chips = ChipParser.GetAllChips();

            foreach (var chip in chips)
            {
                ship.Chips.Add(chip);
            }
        }
Esempio n. 5
0
 protected override void Update()
 {
     description.Text = string.Empty;
     shop.Items.Clear();
     shop.Items.AddRange(ChipParser.GetAllChips());
     shop.Items.AddRange(ShipParser.GetAllShips());
     shop.Items.AddRange(GunParser.GetGunsToShop());
     inventory.Items.Clear();
     foreach (var item in ship.Inventory.GetItems)
     {
         inventory.Items.Add(item);
     }
     menuButton.Visible = false;
 }
Esempio n. 6
0
        public void AddChip()
        {
            var ship = Init(100);

            ship.Chips.Add(ChipParser.GetChip("System Chip"));
        }