예제 #1
0
        public void GiveThePlayerNothingWhenTheItemDoesNotExist()
        {
            _zoneConfig = ZoneBuilder.Build("Truman Brewery Hall 1");
            var item = _zoneConfig.GetItem("Blue Key");

            Assert.Null(item);
        }
예제 #2
0
        public void GiveThePlayerTheItemItRequested()
        {
            _zoneConfig = ZoneBuilder.Build("Truman Brewery Hall 1");
            var item = _zoneConfig.GetItem("White Key");

            Assert.Equal("White Key", item.GetName());
        }
예제 #3
0
        public Message Take(string item)
        {
            var loot = _startingZone.GetItem(item);

            if (loot == null)
            {
                return(new Message("I can't do that here!"));
            }
            return(new Message(loot.GetName() + ": Taken"));
        }