public void ChipDigger_HavingSiteHardnessIsSoft_DurabilityDecreasesBetween0and1()
        {
            var mineClaim  = new MineClaim(ChipDensity.Scarce, SiteHardness.Soft);
            var chipDigger = ChipDigger.StandardDigger(mineClaim);
            var scoop      = chipDigger.Dig(TimeSpan.FromSeconds(20));

            chipDigger.Durability.Current.ShouldBeGreaterThanOrEqualTo(0);
            chipDigger.Durability.Current.ShouldBeLessThanOrEqualTo(25);
        }
Exemplo n.º 2
0
        public void With_digger_bit_slot_available_but_upgrade_to_large_fails_upgrade()
        {
            var digger = ChipDigger.StandardDigger(MineClaim.Default);
            var item   = new BitUpgradeItem()
            {
                Name              = "better bit",
                Description       = "",
                Id                = 10,
                Level             = 3,
                RequiredSlotLevel = 0,
            };
            var result = DiggerUpgrader.ApplyUpgrade(digger, item);

            result.completed.ShouldBeFalse();
        }
Exemplo n.º 3
0
        public RepairCommandHandlerTests()
        {
            proc      = new MockMainProcess();
            gameState = new GameState();
            Game.SetMainProcess(proc);
            gameState.Miner = Miner.Default();

            var digger = ChipDigger.StandardDigger(new MineClaim(
                                                       PotatoChipMine.Core.ChipDensity.Normal,
                                                       SiteHardness.Firm
                                                       ));

            digger.Name = EXISTING_DIGGER_NAME;

            gameState.Miner.Diggers.Add(digger);
        }
        private ChipDigger EquipDigger(MineClaim mineClaim)
        {
            var digger    = GameState.Miner.Inventory("standard_digger");
            var newDigger = ChipDigger.StandardDigger(mineClaim);

            newDigger.Name = diggerName;
            digger.Count--;
            GameState.Miner.Diggers.Add(newDigger);

            Game.Write($"Digger {newDigger.Name} has been equipped on ");
            Game.Write($"{newDigger.MineClaim.ChipDensity.ToString()} density", PcmColor.Blue);
            Game.Write(" with a ");
            Game.Write($"{newDigger.MineClaim.Hardness.ToString()} hardness", PcmColor.Cyan);
            Game.WriteLine(string.Empty);
            return(newDigger);
        }