public void ItReturnsTheNumberOfArrowsInACavern() { var map = new Map(); var count = map.ArrowsInCavern(0); Assert.AreEqual(0, count); map.PlaceItem(0, MapItems.Arrow); map.PlaceItem(0, MapItems.Arrow); count = map.ArrowsInCavern(0); Assert.AreEqual(2, count); }
public void ItDoesntShootIfThePlayerHasNoArrows() { var presenter = Substitute.For<Presenter>(); var map = new Map(); var game = new Game(presenter, map); map.AddPath(0, 1, Command.Directions.East); map.PlaceItem(0, MapItems.Player); game.Command(new Command { Direction = Command.Directions.East, Order = Command.Commands.Shoot }); presenter.DidNotReceive().ArrowWasFired(); Assert.AreEqual(0, map.ArrowsInCavern(1)); }