private Coordinate WalkUntilAWallIsFound(Coordinate coordinates) { var direction = _randomNumbers.Enum <Compass4Points>(); while (Tiles[coordinates].IsNullOrEmpty()) { coordinates = coordinates.Move(direction); } return(coordinates); }
private Coordinate RandomWalkCoordinates(RoomBlocks blocks, Coordinate point) { Coordinate nextPoint; Compass4Points randomDirection; do { randomDirection = _randomNumberGenerator.Enum <Compass4Points>(); nextPoint = point.Move(randomDirection); } while (!blocks.IsInside(nextPoint)); _logger.Debug($"From Point [{point}] go [{randomDirection.ToString()}] to [{nextPoint}]"); return(nextPoint); }