예제 #1
0
        private static void SeedInitialPlayerInventory(IPlayer player)
        {
            Position defaultPosition = new Position(0, 0);

            ICollectible healthPotion = new HealthPotion(defaultPosition);
            healthPotion.State = ItemState.Collected;

            ICollectible shield = new RegularShield(defaultPosition);
            shield.State = ItemState.Collected;

            ICollectible sword = new RegularSword(defaultPosition);
            sword.State = ItemState.Collected;

            player.AddItemToInventory(healthPotion);
            player.AddItemToInventory(healthPotion);
            player.AddItemToInventory(shield);
            player.AddItemToInventory(sword);
        }
예제 #2
0
        private static void SeedInitialPlayerInventory(IPlayer player)
        {
            Position defaultPosition = new Position(0, 0);

            ICollectible healthPotion = new HealthPotion(defaultPosition);

            healthPotion.State = ItemState.Collected;

            ICollectible shield = new RegularShield(defaultPosition);

            shield.State = ItemState.Collected;

            ICollectible sword = new RegularSword(defaultPosition);

            sword.State = ItemState.Collected;

            player.AddItemToInventory(healthPotion);
            player.AddItemToInventory(healthPotion);
            player.AddItemToInventory(shield);
            player.AddItemToInventory(sword);
        }