public void PlayerHasNoQuiverUnitTest() { OutputHelper.Display.ClearUserOutput(); _arrows.LoadPlayerQuiverWithArrows(_player); Assert.AreEqual("You don't have a quiver to reload!", OutputHelper.Display.Output[0][2]); }
public void ReloadQuiver() { int index = Inventory.FindIndex(f => f.GetType() == typeof(Arrows)); if (index != -1) { Arrows arrows = Inventory[index] as Arrows; arrows.LoadPlayerQuiverWithArrows(this); OutputHelper.Display.StoreUserOutput( Settings.FormatSuccessOutputText(), Settings.FormatDefaultBackground(), "You reloaded your quiver."); if (arrows.Quantity == 0) { Inventory.RemoveAt(index); } } else { OutputHelper.Display.StoreUserOutput( Settings.FormatFailureOutputText(), Settings.FormatDefaultBackground(), "You don't have any arrows!"); } }