public Message Open(string door) { if (!_startingZone.DoesDoorExist(door)) { return(new Message("There's no door")); } var doorIsUnlocked = _startingZone.IsDoorUnlocked(door); if (doorIsUnlocked) { return(Go(_startingZone.GetDoorDirection(door))); } return(new Message("There's no door")); }
public void TellTheUserTheDoorDoesNotExists() { _zoneConfig = ZoneBuilder.Build("StartingZone"); Assert.False(_zoneConfig.DoesDoorExist("Red Door")); }
public void TellTheUserTheDoorExists() { _zoneConfig = ZoneBuilder.Build("StartingZone"); Assert.True(_zoneConfig.DoesDoorExist("White Door")); }