[Question]
  [
## Input:
* An integer \$n\$, which is guaranteed to be \$\ge3\$.
* An integer \$d\$, which is one of \$[-1,0,1]\$.
## Output:
A road of size \$n\$, which will be in a north-west direction if \$d=-1\$; a north direction if \$d=0\$; or a north-east direction if \$d=1\$. The road will always be three spaces wide (or five in general if we'd include the outer borders). In addition, there will be a road separator line on the bottom section, and after that alternating while going upwards.
**Some examples:**
Input: \$n=7, d=1\$  
Output:
```
      / / /
     /   /
    / / /
   /   /
  / / /
 /   /
/ / /
```
Input: \$n=4, d=-1\$
Output:
```
\   \
 \ \ \
  \   \
   \ \ \
```
## Challenge rules:
* Any amount of leading/trailing spaces and/or newlines are acceptable, as long as it prints the required road somewhere on the screen.
* Instead of the options \$[-1,0,1]\$ you are also allowed to use the options \$[0,1,2]\$ or \$[1,2,3]\$ instead. Also, you can choose which of the three options map to which of the three directions. (Make sure to mention which options you've used if it differs from the \$[-1,0,1]\$ for `[north-west, north, north-east]` respectively that is used in this challenge description!)
* Any reasonable output format is acceptable. The most common is of course to print it to STDOUT, but returning it as a string or 2D character list is fine as well.
## General rules:
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest answer in bytes wins.  
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
* [Standard rules apply](https://codegolf.meta.stackexchange.com/questions/2419/default-for-code-golf-program-function-or-snippet/2422#2422) for your answer with [default I/O rules](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods/), so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs. Your call.
* [Default Loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) are forbidden.
* If possible, please add a link with a test for your code (i.e. [TIO](https://tio.run/#)).
* Also, adding an explanation for your answer is highly recommended.
## Test cases:
The two examples above, and:
Input: \$n=10, d=0\$  
Output:
```
|   |
| | |
|   |
| | |
|   |
| | |
|   |
| | |
|   |
| | |
```
  
[Answer]
# [Python 2](https://docs.python.org/2/), ~~79~~ ~~78~~ ~~73~~ 72 bytes
```
n,d=input()
c='|\/'[d]
i=n
while i:print' '*(n-i*d)+c,i%2*c or' ',c;i-=1
```
[Try it online!](https://tio.run/##K6gsycjPM/rv7O/iaqukpPQ/TyfFNjOvoLREQ5Mr2Va9JkZfPTollivTNo@rPCMzJ1Uh06qgKDOvRF1BXUsjTzdTK0VTO1knU9VIK1khvwgoqpNsnalra/gfaBgXV2pFarICyGwt4//mOoZcpjq6hlzGOgYA "Python 2 ‚Äì Try It Online")
Takes `[1,0,-1]` for `[north-west, north, north-east]`
-1 byte, thanks to Neil
[Answer]
# [Python 2](https://docs.python.org/2/), 66 bytes
```
n,d=input()
s=' '+'|\/'[d]
for c in(s*n)[n:]:print' '*n+s,c+s;n+=d
```
[Try it online!](https://tio.run/##HYzBCgIhFEX37ysebpwZjbKFA4ZfMs1KjRHijahRQf9u1uIszuFy07tuO53bc4v3gMqEV3CYGWONpLeR0qMOIxTLkQv@uR754le47RkdRhrKRONCZjUpR6p9M5Eo0olyIWF9@1foZ9BmeVAwy1NHgf6J7qKl@gI "Python 2 ‚Äì Try It Online")
Uses `d=-1` for NE, `d=0` for N, and `d=1` for NW. Takes advantage of leading spaces being allowed. The rule that the *bottom* segment of the road have a separator made it tricky to get the parity right; it's achieved by the slicing `(s*n)[n:]` taking the second half of the `2n` alternations between space and a the road character.
[Answer]
# 1. Python 3.5, 122 120 bytes
Script takes two params: n, d.
d: 0, 1, 2 -> \ | /
[tio.run](https://tio.run/##DYtJCsMgFED3PYUIBZWfNgNkEfEkxoWYNlXIV4wUAr27dfuGdJVPxKlWf6SYCzmvUzKEjSstDpuYxwKNPWzev3pYJsONdIqu6@9J9WZu75iJJx5Jtri/GPIlKOyGzsuU28sooYJ56CHwloMDJ1i4j0r1POYmwfFa61zHPw)
```
import sys;(n,d)=[*map(int,sys.argv[1:3])];c="\\|/"[d]
for i in range(n):j=n+~i;print(" "*(i,0,j)[d],c,c*(j%2<1)or" ",c)
```
output:
```
$ ./script.py 6 2
      /   /
     / / /
    /   /
   / / /
  /   /
 / / /
$ ./script.py 6 1
 |   |
 | | |
 |   |
 | | |
 |   |
 | | |
$ ./script.py 6 0
 \   \
  \ \ \
   \   \
    \ \ \
     \   \
      \ \ \
```
## Explanation
```
# parse input params
(n,d)=[*map(int,sys.argv[1:3])]
# select char for "road"
c="\\|/"[d]
# loop n-times
for i in range(n):
    # complement (how many lines to end)
    j=n+~i
    # print
    #   space i or 0 or j times
    #   road, center of road if j is even else space, road
    print(" "*(i,0,j)[d], c, c*(j%2<1) or " ", c)
```
edit: -2 bytes thanks to Kevin Cruijssen
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~88~~ ~~82~~ ~~80~~ ~~74~~ 71 bytes
-8 bytes thanks to Mazzy  
-6 bytes thanks to AdmBorkBork and Mazzy  
-3 bytes thanks to AdmBorkBork
```
param($n,$d)$n..1|%{' '*($_,($n-$_))[$d]+($y='/\|'[$d])," $y"[$_%2],$y}
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfmvkmZb/b8gsSgxV0MlT0clRVMlT0/PsEa1Wl1BXUtDJV4HKKyrEq@pGa2SEqutoVJpq64fU6MO4mnqKCmoVCpFq8SrGsXqqFTW/q/lUlNJUzBVMOJSV4cyDRBMQxjTTMHwPwA "PowerShell ‚Äì Try It Online")
Uses [0,1,2] for NW, NE, N. Uses `d` as a list index twice to first get the spacing method (Drops off the list when using 2 which returns 0) and then which character to use when drawing the lines. Appends a list to the string of spaces (which innately has spaces between the members when appended as such) which builds the road. Also swaps between an open lane or a dash based on modulo math.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~100~~ 90 bytes
```
f(a,b,c,d){for(c=a,d="\\|/"[b+1];c--;)printf("%*c %c %c\n",b>0?c+1:b?a-c:0,d,c%2?32:d,d);}
```
[Try it online!](https://tio.run/##XYzRCsIgGEbv9xQhDLT9kq4gmCwfJLvQXxyDsrEtulh79cwuC87Fx@HjIO8QUwrUggMEz5ZwHym2FnxLjHntyNlV8qKQc8WGsY9zoKTc4qb8YiIBdxIaK9k4bTk2AjxgWet93fhcU2u62T5SthRFoAfgkqlieMwTJSSv7KQA8e@O8Htb0xvD1XZT4s8P "C (gcc) ‚Äì Try It Online")
---
[Well written version](https://tio.run/##jZJRT4MwEMff@RQnhtBp0WKWmIibX8Ann3khbRmXsLJA54vy2bG0shLZ1EvTXsvvf727wpMd58NwjYrXRyHhudMCm7tqGwTvDQo4tKj0W1MIYlaopdrpisLoC2wl19io1UcQgDFeFS3UqGTm9lgSD8EW2AQaGzHYQHwff8M9yLqTRgPEa642wOCMKs9/yJbI54lwS9m0YEtA89WVkRk/SUxe2fwOW9uhEK@OmZ2X5FI11k4acwHOdP@qbBHBpQjJuVC/yNic9q59xZKE0Q2HaBy5CulMeAspta0zTxs9vMQQP7ndOK98J/th7M6@QEWm5P0PsqZJalh7eNQdCcNJ6ZmUUfYX80iXYfrhCw "C (gcc) ‚Äì Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~33~~ ~~29~~ 23 bytes
```
‚Ü∑ÔºÆÔºÆŒ∑‚äò‚äïŒ∑ÔºµÔº•¬π¬¶¬πÔº¶‚ü¶¬≤¬±¬≤‚üß¬´Ôº™Œπ‚Å∞Œ∑
```
[Try it online!](https://tio.run/##TYw9C8IwFADn9ldkfIEItro5C1akdHATh5i@2kA@SngJgvjbY4qL2x0cp2YZlJcm50EnTxecCDq3ROqjfWAAzg/1v8/Fh6AdwUmahGOJVUCLjgrPfM2PL0I3QiNYU2zygcGtFazHpySElt85e9fVOdrl6kELti1V9Xuu90/OO7bPm2S@ "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Now that all of the underlying Charcoal bugs seem to be fixed I can advertise the optimal code. Explanation:
```
‚Ü∂ÔºÆ
```
Rotate the cursor direction anticlockwise according to the first input, so that 1 becomes north east, 2 north and 3 north west.
```
ÔºÆŒ∑
```
Input the length of the road.
```
‚äò‚äïŒ∑ÔºµÔº•¬π¬¶¬π
```
Print half the length of the road and then stretch it giving the road separator.
```
Ôº¶‚ü¶¬≤¬±¬≤‚üß¬´Ôº™Œπ‚Å∞Œ∑
```
Print the sides of the road.
@KevinCruijssen subsequently submitted a harder version of this question which was since deleted but users with enough rep can see it here: [The (Hard) Road to Code](https://codegolf.stackexchange.com/questions/181383/) The stretching trick I used in this answer isn't applicable to that question, so instead I wrote the following ~~47~~ 45-byte program:
```
Ôº¶¬≥¬´Ôº™√óŒπ‚äò‚äïŒ∏‚Å∞‚âî‚Ä¶‚ü¶¬π ‚üß‚äïÔπ™Œπ¬≤ŒπÔº¶Œ∑¬´‚Ü∂¬ßŒ∫‚Å∞Ôº¶‚äñ¬ßŒ∫¬π¬ßŒπ‚ÖâÔº∞¬ßŒπ‚Öâ‚Üë‚Ü∑¬ßŒ∫‚Å∞
```
[Try it online!](https://tio.run/##dY9Pi8IwEMXP7acYPE0gwtbedk@iB11WENGDlB5KO9qwaVLbtCjiZ49NXNDDepk/5P3em@Rl1uQ6k9YedAMYM7iGwXdX1VuNW1FRi4LDIpM9FbhUeUMVKTPMJ8YYhw/2FQbTthVHhbNLLmlW6hqTiMMIRimHV2Kli05qZzfxrHCsDy19aLAWvTY/dDA4NUtV0Bl/XYKTPXRzerq9SKLBDtaNUE9wCNkje6CrThpRv3/WPeHnrvaLP2EjjuU/N9zCm7VJzCFxJR5@l0z@euR6mtpxL@8 "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation:
```
Ôº¶¬≥¬´
```
Loop over the sides and separator.
```
Ôº™√óŒπ‚äò‚äïŒ∏‚Å∞
```
Jump to the start of the side.
```
‚âî‚Ä¶‚ü¶¬π ‚üß‚äïÔπ™Œπ¬≤Œπ
```
Make an array containing a `1` and a space, but remove the space again if we're drawing the sides rather than the separator.
```
Ôº¶Œ∑¬´
```
Loop over each road section.
```
‚Ü∂¬ßŒ∫‚Å∞
```
Rotate the cursor direction accordingly.
```
Ôº¶‚äñ¬ßŒ∫¬π
```
Loop over one less than the length of the road section...
```
¬ßŒπ‚Öâ
```
... and print alternating elements of the array. The alternation is achieved by cyclically indexing into the array with the Y-coordinate of the cursor.
```
Ôº∞¬ßŒπ‚Öâ
```
Print the last row of this road section, but without moving the cursor...
```
‚Üë
```
... so that the cursor can be moved up ready for the next section instead.
```
‚Ü∑¬ßŒ∫‚Å∞
```
Rotate the cursor direction back ready for the next section.
[Answer]
# [Kotlin](https://kotlinlang.org), ~~96~~ 92 bytes
```
{n,d->val c="\\|/"[d];(0..n-1).map{println(" ".repeat(n-it*(d-1))+ "$c ${" $c"[it%2]} $c")}}
```
Accepts [0, 1, 2] instead of [-1, 0, 1]
It works similarly to solutions in other languages, but unfortunately Kotlin doesn‚Äôt really shine in this one.
`val c=‚Äú\\|/‚Äú;` retrieves the char to use in road building by taking advantage of the fact that Kotlin treats Strings like an Array of chars (as it should, looking at you Java)
[Try it online!](https://tio.run/##fY@xCsIwGIT3PsVvqPBHm6jFSWnBUfAN2g6hiRBs/5YSBal59posjt5w3PDB3T0G11laXqqD@5PaE@CVXAbBOIgSLvSGYpkp06KMTFuwuv7sWKWbM@6lJHHgslfjPE6WXEfIgMnJjEY5JGHdBnUg@BZY2kI6M0hbVlm3zhsfI/d@CbXQK0vIYU4gKPYQFDAZpW@WDPLVSrohTEL@A/Q/ID7BsJknfjkm@Rc)
[Answer]
# TSQL code, ~~171~~ 117 bytes
I realized this could be written much shorter as code.
```
DECLARE @n INT=7,@d INT=0
,@ INT=0a:PRINT
space(@n-@*@d)+stuff(replicate(substring('\|/',@d+2,1)+' ',3),3,@%2,space(@%2))SET
@+=1IF @n>@ GOTO a
```
# TSQL query, 137 bytes
```
USE master
DECLARE @n INT=6,@ INT=-1
SELECT space(@n-y*@)+z+iif(y%2=1,z,'  ')+z 
FROM(SELECT top(@n)row_number()over(order
by @)y,' '+substring('\|/',@+2,1)z FROM spt_values)x
```
*USE master* is not necessary, if your database is master already. Some users however have a different default database.
Script when *trying it out* is slightly different. I had to replace space ascii-32 with ascii-160, the spaces were not shown.
**[Try it out](https://data.stackexchange.com/stackoverflow/query/1004939/the-easy-road-to-code)**
Made some tweaks and realized that I could replace 
> 
> order by 1/0
> 
> 
> 
with 
> 
> order by @
> 
> 
> 
[Answer]
# [Canvas](https://github.com/dzaima/Canvas), ~~23~~ 22 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
```
B}‚Å¥H‚ÄüÔΩç‚Ü∂‚Å∑ÔºüÔºè|‚àô/‚ïãÔºΩÔºº|‚àô\‚ïãÔºΩÔΩù
```
[Try it here!](https://dzaima.github.io/Canvas/?u=QiU3RCV1MjA3NEgldTIwMUYldUZGNEQldTIxQjYldTIwNzcldUZGMUYldUZGMEYlN0MldTIyMTkvJXUyNTRCJXVGRjNEJXVGRjNDJTdDJXUyMjE5JTVDJXUyNTRCJXVGRjNEJXVGRjVE,i=NSUwQTI_,v=8)
Uses the direction inputs 0, 1 and 2.
Explanation:
```
...‚Äü    push "--¬∂¬∂- ¬∂¬∂--"
    m   mold the horizontal length to the 1st input - a horizontal road
     ‚Ü∂  rotate counter-clockwise - so the separator is on the bottom
        also replaces the dashes with bars
‚Å∑?     ]     ]}  switch over the 2nd input:
                 default case (input 2):
  /                pad with spaces to a "/" diagonal
   |‚àô/‚ïã            replace "|" with "/"
                 case 0:
        \          pad with spaces to a "\" diagonal
         |‚àô\‚ïã      replace "|" with ""
case 1 is empty, but because of a bug, the trailing "}" is still required
```
[Answer]
# JavaScript (ES8), ~~¬†90 87¬†~~ 85 bytes
Takes input as `(direction)(length)`. Expects \$0\$ for North-West, \$1\$ for North or \$2\$ for North-East.
```
d=>g=(n,w=n)=>n?(c='/|\\'[d]).padStart([n--,,w-n][d])+` ${n&1?' ':c} ${c}
`+g(n,w):''
```
[Try it online!](https://tio.run/##ZcyxCoMwFEDR3a9wKM17xNikFApC9CM6qmBIVCySiIY6tH57qmPpeM9wn@qlFj0Pk2fWmTZ0MhiZ9xJsskqOMrcFaEkun6oipakxnZR5eDV7KC1jSULpWh9Om/j0tmdRkJhkettDb1FD@@ODGSFBO7u4sU1H10MHHCG@I0a/et319qcCQXDE8AU "JavaScript (Node.js) ‚Äì Try It Online")
---
# JavaScript (ES6), 90 bytes
This one draws the output character by character with a little more maths instead of the `.padStart()` method.
Takes input as `(direction)(length)`. Expects \$1\$ for North-West, \$2\$ for North or \$3\$ for North-East.
```
d=>n=>(g=x=>y?` /|\\
`[x+5?17+y%2*4>>--x+5-[,n+1-y,n,y][d]&1&&d:(x=n,y--,4)]+g(x):'')(y=n)
```
[Try it online!](https://tio.run/##ZcjRCoIwFADQd7/Cl/TetlvNDEHY/BAVFKdiyBYZsUH/vnyNHs@59@9@G57L40XG6jFMMmipjFQwSyeVr7r4/GmaqKsdu1WiYP6QHXOliHZTzQ0T5Lnhvq11m4gk0SU4uZuI59iyGRyWaYrgpcEwWLPZdTytdoYJBEJcIEa/e903/9sMQVwQwxc "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~¬†31¬†~~ 30 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
‚Å∂·∫ã·∫ã∆§·∏Ç};‚Ç¨·ªã‚Äú\/|‚Äù·∫ã3K∆ä}·πö‚Åπ¬°‚Å∂-2¬¶‚Ç¨√êe·πö
```
A dyadic Link accepting the length on the left and the negated-direction\* on the right which yields a 2d array of characters.  
\* `[north-west, north, north-east]=[1, 0, -1]`
**[Try it online!](https://tio.run/##y0rNyan8//9R47aHu7qB6NiShzuaaq0fNa15uLv7UcOcGP2aRw1zgRLG3se6ah/unPWoceehhUDlukaHlgFVHZ6QChT8f3h55P//hkb/DQE "Jelly ‚Äì Try It Online")** (footer calls the Link, joins with newline characters and prints the result)
### How?
```
‚Å∂·∫ã·∫ã∆§·∏Ç};‚Ç¨·ªã‚Äú\/|‚Äù·∫ã3K∆ä}·πö‚Åπ¬°‚Å∂-2¬¶‚Ç¨√êe·πö - Link: integer, L; integer, D
‚Å∂                              - space character
 ·∫ã                             - repeat L times
     }                         - using the right argument (D):
    ·∏Ç                          -   mod 2 (0 if D = 0, 1 otherwise ...A would work too)
   ∆§                           - for each prefix (of the list of spaces):
  ·∫ã                            -   repeat (D mod 2 times)
                  }            - using the right argument (D):
                 ∆ä             -   last three links as a monad:
        ·ªã‚Äú\/|‚Äù                 -     index into "\/|" (1-indexed & modular)
              ·∫ã3               -     repeat three times - e.g. "\\\"
                K              -     join with spaces          "\ \ \"
      ;‚Ç¨                       - concatenate ‚Ç¨ach (altered prefix with that list)
                     ¬°         - repeat action...
                    ‚Åπ          - ...number of times: right argument (-1 repeats 0 times)
                   ·πö           - ...action: reverse (i.e. reverse if north-west)
                           √êe  - for even indexes:
                         ¬¶‚Ç¨    -   sparse application for ‚Ç¨ach...
                       -2      -   ...to indices: [-2] (the middle of the road)
                      ‚Å∂        -   ...action: a space character
                             ·πö - reverse
```
[Answer]
# Python 2, 127 bytes
```
n,d=input()
c='|/\\'[d]
for i in range(n):t=0if d==0else(i if d<0else n-i);print(' '*t+'{} {} {}'.format(c,' 'if i%2==0else c,c))
```
[Try it online!](https://tio.run/##LYxBCsIwEEX3PcVsZBKNWrsRrDmJdVGSVAfqNKTjQtSzx1CEv3k8/osvuU/c5MzGW@L4FKUrZ/Gz7zq8@Gs1TAkIiCH1fAuK9UlsTQN4a@swzkEVWei8APCWdBsTsSgEXMsG319YhrtSevSinCmmXGjV/BPgjNM656M5/AA)
First two lines taken from @TFeld.
[Answer]
# [Python 2](https://docs.python.org/2/), 93 bytes
```
n,d=input();p=''
while n:g='|/\\'[d];n-=1;print['',' '*n,p][d]+g+' %s '%(g,' ')[n%2]+g;p+=' '
```
[Try it online!](https://tio.run/##LY7BCoMwEETv@YpFkNUaqZFCQcnRXnvpTT20GlRaYkgjrdB/TxPb0zJvhplVqxlnmdtu7gVw0EEQWEl7Pkm1mCguFUckr3F6CJDFwPGzbxqs@7aUKWel0pM0NSJFwJ2kqnVOMiQI4RMwjAbP41qGuaOlSriT1i2Qf@NFL6IgAEav/gCIt@jAv7KprZ142glloDqfKq1n/YvetLjeLctoRg40ZeRI2Rc "Python 2 ‚Äì Try It Online")
[Answer]
# [J](http://jsoftware.com/), 64 bytes
```
' \|/'{~(_2&|*[:i.[*1 _1{~3=])|."_1((5+[){."1(5,~[)|.@$]*#:@689)
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/1RViavTVq@s04o3UarSirTL1orUMFeINq@uMbWM1a/SU4g01NEy1ozWr9ZQMNUx16qKBgg4qsVrKVg5mFpaa/zW5FLhSkzPyFcwV0hQMIUxTINMIwjQ0BrKN/wMA "J ‚Äì Try It Online")
* 1 North-West
* 2 North
* 3 North-East
Will try to golf it later
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), ~~129~~ ~~107~~ ~~103~~ 93 bytes
```
a=>b=>{for(char i=a,W="/|\\"[b+1];i>0;)Write("{0,"+(a-i*b+5)+"} {1} {0}\n",W,--i%2<1?W:' ');}
```
-1 for north-east, 1 for north-west, 0 for north
[Try it online!](https://tio.run/##TYy7CsIwFEB3v6IEpPeaBBPFQdNEXPyFDNYhDRbvkkJbp9pvj49FhzMcDpw4yDhQPj9SrOI99OIUR@pSRWl0rrU5WNdYN7VdD59ckA3CW7Z@1jW7NFxfDTll0Pc03oBNSjAOQdKq4TvkbC4m/UbNdWLCCylpuan00R/KokQzZ7No4ftFrRA0/nyPIP9dbxEUmvwC "C# (Visual C# Interactive Compiler) ‚Äì Try It Online")
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal), 91 bytes
```
¬£:0=[¬•(n‚ÇÇ[`| | |`|`|   |`],)|1=[¬•(√∞n*n‚ÇÇ[`\ \ \\`|`\   \\`]+,)|¬•(√∞¬•‚Äπn-*n‚ÇÇ[`/ / /`|`/   /`]+,
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=&code=%C2%A3%3A0%3D%5B%C2%A5%28n%E2%82%82%5B%60%7C%20%7C%20%7C%60%7C%60%7C%20%20%20%7C%60%5D%2C%29%7C1%3D%5B%C2%A5%28%C3%B0n*n%E2%82%82%5B%60%5C%20%5C%20%5C%5C%60%7C%60%5C%20%20%20%5C%5C%60%5D%2B%2C%29%7C%C2%A5%28%C3%B0%C2%A5%E2%80%B9n-*n%E2%82%82%5B%60%2F%20%2F%20%2F%60%7C%60%2F%20%20%20%2F%60%5D%2B%2C&inputs=5%0A-1&header=&footer=)
A little better.
[Answer]
# [Red](http://www.red-lang.org), 157 bytes
```
func[s d][p: pick"\|/"d set[a b]reduce pick[[4 1]0[5 + s -1]]d 
repeat n s[print pad/left form reduce pick[[p" "p][p p p]]odd?(n + pick[1 0]odd? s)a: a + b]]
```
[Try it online!](https://tio.run/##VY29CsMwEIP3PIXw1FJK4v6Tpe/Q9XqDk7MhtHWM7Wx9d9dkKwIN@pAUrZSHFeLG9cUtfqQEYQo9wjS@1PPbKkGymQwGjlaW0a6E6ATNHZ2xQ8JeMwuaaIM1GR6JQpx8RjDSvq3LcHP84K8eFFSoR6hinkXuG1@3VqjRrQnS1vQwNR6Yi8MVunG44FD9hmP5AQ "Red ‚Äì Try It Online")
* 1 North-West
* 2 North
* 3 North-East
[Answer]
# Japt, 53 bytes
```
W="|/\\"gV;√Ü"{W} {Y√â %2?W:' } {W}"√πV√Ñ?V?Y+5:5:U-Y+4√Éw
```
[Try it Online!](https://ethproductions.github.io/japt/?v=1.4.6&code=Vz0ifC9cXCJnVjvGIntXfSB7WckgJTI/VzonIH0ge1d9IvlWxD9WP1krNTo1OlUtWSs0w3c=&input=MTAKMQotUg==)
[Answer]
# [Swift 4.2](https://swift.org), ~~112~~ 108 bytes
-4 bytes thanks to Sriotchilism O'Zaic
```
let c=["\\","|","/"][d];(0..<n).map{print((0..<n-$0*(d-1)).map{_ in" "}.joined()+c+" \($0%2==0 ?c:" ") "+c)}
```
[0,1,2] instead of [-1,0,1].
[Try it online!](https://tio.run/##VU7BCoJAFLz3FY@Hwb7UbRVPlnTuG1QidhU26iW10cH22zdDgjrMwMwwzNyftndF6B@sYbhZdoLLPbvEfJjGcO4c6KrGpsEEXxPW2Nam3Qgl5ZZJXo7DOPdmJ43USpg0ozk6gGUE9PJ0tdwZQbGOERoRqWVeVQp2upxiAow1eR@@D4ppX9HiV2b/MqfwBg)
## Explanation
```
let c=["\\","|","/"][d]
```
Determines the street sign to use. (I bet this can be shortened somehow)
```
(0..<n).map{
```
Iterates over the length of the street.
```
(0..<n-$0*(d-1)).map{_ in" "}.joined()
```
Adds the spaces in front of the street.
```
\($0%2==0 ?c:" ")"
```
Adds the middle sign to every other line.
My very first one ‚òùÔ∏è, I'm happy about any optimization advices. Learned mostly from that thread: [Tips for golfing in Swift](https://codegolf.stackexchange.com/questions/79203/tips-for-golfing-in-swift?newreg=5f12c38fe2f34c2893c486bec51c5d0e).
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 66 bytes
```
->\n,\d{{(' 'x--$ *d%-+^n~(' ',<\ | />[d+1])[1,(n+$++)%2,1])xx n}}
```
[Try it online!](https://tio.run/##HYhLDoIwFEXnrOKGFHm1r0qN0YHKRqgaE2yi0WJwUgK49SqOzud1bR@b@OwwczhEXVrPtu57ypEHrQXmdabVyX@mwXuLAcuyqpU5ysoweSWUktmKfx0C/DjG96WDo0Gc5eLe3Dyl1qeSMQGuaRPaMozkhNYM/RdTMAq5i18 "Perl 6 ‚Äì Try It Online")
Returns a list of lines.
### Explanation
```
->\n,\d{                                                         }  # Block taking n, d
        {                                                       }   # Reset $ variables
         (                                                 )xx n    # Repeat n times
          ' 'x  # Space times
              --$ *d  # (-1,-2,-3,...) if d=1
                      # (0,0,0,...) if d=0
                      # (1,2,3,...) if d=-1
                    %-+^n  # modulo -~n = n+1
                         ~  # Concat
                          (' ',<\ | />[d+1])  # Space or line
                                            [1,(n+$++)%2,1]  # Alternate middle char
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 90 bytes
```
n,a=*$*.map{|i|-i.to_i}
c='|\/'[a]
n.upto(-1){|i|puts' '*(i*a-n)+c+' '+[' ',c][i%2]+' '+c}
```
[Try it online!](https://tio.run/##HYo7DoAgFMB2TuGgQUEwGFdPgsQg0xtEojAY8ezPz9KkTfe0nIi@tSMrmVxtuDJkATJuM9zEjTRPHdXWEC9TiFstVPMdIcWDFpTVwKzwDXf8Na5ftM5oqHrzB3cj4oBCPQ "Ruby ‚Äì Try It Online")
UPDATE: Thank you, Kevin, for pointing out that my original submission was missing spaces between the road edges and markers (i.e., 3-width roads instead of 5-width.) That said, there might be a shorter fix for that than `c+' '+...+' '+c`.
Directional information: `-1, 0, 1` maps to `{ north-west, north, north-east }`
Arguments: this reads command-line arguments such as `4 -1` (a four row road, slanted to the north-west).
Additional note: This was tested locally with Ruby v2.6.1, and it appears that *Try It Online* uses Ruby v2.5.3. I have no reason to think it would not work with all other Ruby versions.
[Answer]
# [Java (JDK)](http://jdk.java.net/), 116 bytes
```
d->n->{for(int c="\\|/".charAt(d),i=n;i-->0;)System.out.printf("%"+(d<1?n-i:d>1?i+1:1)+"c%2c %c%n",c,i%2<1?c:32,c);}
```
[Try it online!](https://tio.run/##ZY5Pa4NAEMXv@RSDIOw2uo0WWoiJoRQKPfSUY9PDdlbTSXVX1jEQUj@7tRJyyWn@/B7vvYM@6vhgfgaqG@cZDuOtOqZKlZ1FJmfVXTZruq@KELDSbQvvmiycZwCXb8uax3F0ZKAemdiyJ7v/@ATt962cpABvll8vjqtxf3G27erC5@CdNuvBxLmN83PpvCDLgOtgt/u9DxR@a//MwsiI1jajOM4XmdyeWi5q5TpWzRjFpQjCYC7MKtnYmJYmTzY0T5aJnAcYpgghhjaIMKIwHSW4fEgjlFk/ZFOz/wJKN011EqlUGrFoWDzJG5hcYbK4pYsrfZxgP@uHPw "Java (JDK) ‚Äì Try It Online")
Takes `d` as one of `0`, `1` or `2`.
[Answer]
# [Japt](https://github.com/ETHproductions/japt) `-R`, 40 bytes
```
√Ü=Vg"|\\/";¬≤i1S+iX%2?S:U)iSp[TZ√ä-YY]gV√Éw
```
[Try it online!](https://tio.run/##y0osKPn//3CbbVi6Uk1MjL6S9aFNmYbB2pkRqkb2wVahmpnBBdEhUYe7dCMjY9PDDjeX//9voaNgyMWlGwQA "Japt ‚Äì Try It Online")
### Explanation:
```
√Ü=Vg"|\\/";¬≤i1S+iX%2?S:U)iSp[TZ√ä-YY]gV√Éw
                                            // U = road size
                                            // V = direction
√Ü                                     √É     // Loop X through [0...U]
 =        ;                                 //   Set U to:
    "|\\/"                                  //       "|\/"
  Vg                                        //            [V]
           ¬≤                                //  Double U
            i1          )                   //  Insert at index 1:
              S+                            //    " " +
                 X%2?S:U                    //         X%2?" ":U
                i                           //                  + " "
                         i                  //  Insert at index 0:
                          Sp                //    " " repeated this many times:
                            [TZ√ä-YY]        //      [0,U.length - X,X]
                                    gV      //                        [V]
                                        w   // Reverse output
      
  
```
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 23 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
√π‚ïí‚Üê‚à©‚ôÇ2Œ©‚Åø¬°‚îú‚à©22‚ôÄ√á‚óã=√∑√¢‚ïßŒ¥√ñ‚Üë
```
[Run and debug it](https://staxlang.xyz/#p=97d51bef0b32eafcadc3ef32320c80093df683cfeb9918&i=1+7%0A-1+4%0A0+10&a=1&m=2)
Input is two integers separated by a space.  
The first is `d`. -1 specifies north-east. 0 for north. 1 for north-west.
The second parameter is `n`.
These two values will get implicitly parsed from input and placed on the input stack with `n` on top.
Additionally `d` will be accessible from the stax's `x` register since it's the first implicitly parsed value.
For example, input "1 7"
```
            Main stack      Explanation
            ----------      -----------
;           [7]             peek from input stack
m                           map over integers [1..n] using the rest of the program
                            output each produced value implicitly
  ;         [1 7]           peek from input stack
  +         [8]             add
  .*"       [8 [42 34]]     2 character string literal with codepoints 42 and 34
  @         [42]            get the element at the specified modular index (8)
  0         [42 0]          literal zero
  "|\/"x@   [42 0 92]       get codepoint from string literal at input d (from x register)
  \         [42 [0 92]]     make pair
  :B        ['\ \ \ ']      encode in custom base; it's binary with custom codepoints
  _x*       ['\ \ \ ' 1]    (loop variable) * (input d)
  ;^        ['\ \ \ ' 1 8]  peek from input stack and increment
  %         ['\ \ \ ' 1]    modulus
  6+        ['\ \ \ ' 7]    add 6
  )         [' \ \ \ ']     left-pad to length
```
[Run this one](https://staxlang.xyz/#c=+++++++++%09Main+stack++++%09Explanation%0A+++++++++%09----------++++%09-----------%0A%3B++++++++%09[7]+++++++++++%09peek+from+input+stack%0Am++++++++%09++++++++++++++%09map+over+integers+[1..n]+using+the+rest+of+the+program%0A+++++++++%09++++++++++++++%09output+each+produced+value+implicitly%0A++%3B++++++%09[1+7]+++++++++%09peek+from+input+stack%0A++%2B++++++%09[8]+++++++++++%09add%0A++.*%22++++%09[8+[42+34]]+++%092+character+string+literal+with+codepoints+42+and+34%0A++%40++++++%09[42]++++++++++%09get+the+element+at+the+specified+modular+index+%288%29%0A++0++++++%09[42+0]++++++++%09literal+zero%0A++%22%7C%5C%2F%22x%40%09[42+0+92]+++++%09get+codepoint+from+string+literal+at+input+d+%28from+x+register%29%0A++%5C++++++%09[42+[0+92]]+++%09make+pair%0A++%3AB+++++%09[%27%5C+%5C+%5C+%27]++++%09encode+in+custom+base%3B+it%27s+binary+with+custom+codepoints%0A++_x*++++%09[%27%5C+%5C+%5C+%27+1]++%09%28loop+variable%29+*+%28input+d%29%0A++%3B%5E+++++%09[%27%5C+%5C+%5C+%27+1+8]%09peek+from+input+stack+and+increment%0A++%25++++++%09[%27%5C+%5C+%5C+%27+1]++%09modulus%0A++6%2B+++++%09[%27%5C+%5C+%5C+%27+7]++%09add+6%0A++%29++++++%09[%27+%5C+%5C+%5C+%27]+++%09left-pad+to+length&i=1+7%0A-1+4%0A0+10&m=2)
[Answer]
# perl -M5.010 -Mfeature=signatures, 97 bytes
```
sub f($n,$d){$x=qw[| / \\][$d];say" "x($d<1?$_*-$d:$n-$_),$x,$",($n-$_)%2?$":$x,$",$x for 1..$n;}
```
]