[Question]
  [
> 
> Version 2 [here](https://codegolf.stackexchange.com/q/131845/70347).
> 
> 
> 
Simple challenge: given an integer, draw a house of cards with the given number of stories. If the number is negative, draw the house upside-down. Examples:
```
Input: 2
Output:
 /\
 --
/\/\
Input: 5
Output:
    /\
    --
   /\/\
   ----
  /\/\/\
  ------
 /\/\/\/\
 --------
/\/\/\/\/\
Input: 0
Output: <empty, whitespace or newline>
Input: -3
Output:
\/\/\/
 ----
 \/\/
  --
  \/
```
Input can be numeric or a string. Output must be exactly as shown, with leading and/or trailing spaces and newlines allowed.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so may the shortest program/function for each language win!
  
[Answer]
# [Python 2](https://docs.python.org/2/), ~~97~~ ~~95~~ ~~94~~ 92 bytes
-2 bytes thanks to Luka  
This version produces an exception on `n=0`,but without printing anything
```
n=input()*2
m=abs(n)
for i in range(2,m+1)[::n/m]:print(i/2*'/-\-'[i%2::2][::n/m]).center(m)
```
[Try it online!](https://tio.run/##LckxDsIwDAXQvafIgmoXQoTFZKknaTsUFMBDfqM0DJw@XXjry7/62SCtYTTkbyUepEvj@tgJ3L224swZXFnxjiSXdL7xpIqQFs3FUMmCDH3ws@8nO4mqLP/n6zOixkKJW/P3Aw "Python 2 – Try It Online")
### Non-error version, Python 2, 94 bytes
```
n=input()*2
x=n>0 or-1
for i in range(2,x*n+1)[::x]:print(i/2*'/-\-'[i%2::2][::x]).center(n*x)
```
[Try it online!](https://tio.run/##HclBDoIwEAXQPafoxtBWKzJhNQleBFgYUnQ2v82kJvX0NeFtX/6VTwK1hlmQv8U6T12d8XyYpGHsjqRGjMDoC@9o6VY9rqNbmOvGWQXFykC@H8Ia@kUuxEzbue6@R5SoFr661sL0Bw "Python 2 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~30~~ ~~29~~ 24 bytes
```
ÄF„--N×„/\N>×}).C∊2ä¹0‹è
```
[Try it online!](https://tio.run/##MzBNTDJM/f//cIvbo4Z5urp@h6cDaf0YP7vD02s19ZwfdXQZHV5yaKfBo4adh1f8/69rCgA "05AB1E – Try It Online")
**Explanation**
```
ÄF                         # for N in [0 ... abs(input-1)] do:
  „--N×                    # push the string "--" repeated N times
       „/\N>×              # push the string "/\" repeated N+1 times
             }             # end loop
              )            # wrap stack in a list
               .C          # pad strings on both sides to equal length
                 ∊         # vertically mirror the resulting string
                  2ä       # split in 2 parts
                    ¹0‹    # push input < 0
                       è   # index into the the list with the result of the comparison
```
[Answer]
# [PHP](https://php.net/), 125 bytes
input negative leading newline
input positive trailing newline
```
for($s=str_pad;++$i<$b=2*abs($argn);)$t.=$s($s("",2*ceil($i/2),["-","/\\"][1&$i]),$b," ",2)."
";echo$argn>0?$t:$t=strrev($t);
```
[Try it online!](https://tio.run/##HY3RCoIwFEDf/Yq4XGJXl9Z6ay4/RCWmzTaIHNvo95f5eOBwjrc@t523vkAdXh8FV5B5WQPDqGIKD6@fsqrQtTgpUeopst0jSZhqhRtGBsBFORv3ZugaQbyHE3BohgHG/nJENxLHicNh06iGAqSZ7bpn7ucO0w3TfxXMl2EimfMP "PHP – Try It Online")
# [PHP](https://php.net/), 130 bytes
```
for(;++$i<$b=2*abs($a=$argn);)echo($s=str_pad)($s("",2*abs(($a<0?$a:$i&1)+($i/2^0)),["-",["/\\","\/"][0>$a]][1&$i]),$b," ",2)."
";
```
[Try it online!](https://tio.run/##Jc5BDsIgFATQfU9hfn4avkWhTdxIsQdp0YBVYWMJeH8kupnM4mUy0ccyTtHHBm16vTWcQJXnlpjqOgwjOj3srcsMrf4BUvS4@41h1vmTbtGuVDsD4H9X4SgntGcMbU8dwyCGqyTiMxyghlgW4LAIMLO8oDVm7lsMhjg6Dru6Qkdo6oXyBQ "PHP – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 39 bytes
```
|:"G|@-:~'/\'G0<?P]@E:)htg45*c]xXhG0<?P
```
[**Try it online!**](https://tio.run/##y00syfn/v8ZKyb3GQdeqTl0/Rt3dwMY@INbB1UozoyTdxFQrObYiIgMs@P@/rikA "MATL – Try It Online")
### Explanation
```
|         % Implicitly input, N. Absolute value
:"        % For k from 1 to that
  G|      %   Push absolute value of N again
  @-      %   Subtract k
  :       %   Range [1 2 ... N-k]
  ~       %   Convert to vector of N-k zeros
  '/\'    %   Push this string
  G0<     %   Is input negative?
  ?       %   If so
    P     %     Reverse that string (gives '\/')
  ]       %   End
  @E      %   Push 2*k
  :       %   Range [1 2 ... 2*k]
  )       %   Index (modularly) into the string: gives '/\/\...' or '\/\/...'
  h       %   Horizontally concatenate the vector of zeros and the string. Zeros
          %   are implicitly converted to char, and will be shown as spaces
  t       %   Duplicate
  g       %   Convert to logical: zeros remain as 0, nonzeros become 1
  45*c    %   Multiply by 45 (ASCII for '=') and convert to char
]         % End
x         % Delete (unwanted last string containing '=')
Xh        % Concatenate into a cell array
G0<       % Is input negative?
?         % If so
  P       %   Reverse that cell array
          % Implicit end. Implicit display
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 169 ~~171~~ ~~173~~ ~~160~~ ~~164~~ bytes
```
#define F(A,B,C)for(i=A;B--;)printf(C);
#define P puts("");F(y,i," ")F(abs(n)-y
s,i,x,y;f(n){x=n<0;for(s=x?1-n:n;s--;){y=x?-n-s:s;P,i,x?"\\/":"/\\")y+=x;P,s>x&&i,"--")}}
```
+13 bytes for negative case bug.
[Try it online!](https://tio.run/##NY7BCsIwEETv@YqwguxiFvUgQmMVFXruB/SitZEcjKVRSCj99poKvb0Zdmem5mddj@Pi0RjrGlngWV3Ulcy7Q5uf9YVZU9tZ9zF4JS3mu1K2349HANIFRmUVSKACb3ePjjgKn6ygojZJ9iF3h42eIn0eTlt2mdN@Cu5j0uzYZ16X08cJqmoNGayrCiiu8pBsfwzLZSpgBhqG8XWzDkn0QkppkHdp1J82M@wTDGL8AQ "C (gcc) – Try It Online")
Ungolfed (207 bytes after removing all spaces and newline):
```
s, i, x, y;
f(n) {
  x = n < 0;
  for (s = x ? 1 - n : n; s--;) {
    y = x ? - n - s : s;
    puts("");
    for (i = y; i--;) printf(" ");
    for (i = abs(n) - y; i--;) printf(x ? "\\/" : "/\\");;
    y += x;
    puts("");
    for (i = y; i--;) printf(" ");
    for (i = abs(n) - y; s > x && i--;) printf("--");;
  }
}
```
[Answer]
## Charcoal, ~~31~~ ~~28~~ 27 bytes
```
ＦＩ⊟⪪θ-«←ι↓→/…\/ι↙»‖Ｍ¿‹Ｎ⁰‖Ｔ↓
```
[Try it online!](https://tio.run/##VY6xDoIwEIZneIqm05HQYOKGoy4m1BB0ZKnYSpPSYltwMD57LQnGeNt99/@Xr@uZ7QxTIQhjEeyZ81CbEc6jkh4eOcIEZ3HQK01qK7WHsuLC50hmuzShZuZQHsxTL9t6b@S9jwFc4B@kRt0At22Bl@Z/dfkXyTttuFC881RaayxEJAWCijsHRz1O/jQNVx55jjbRZw1fLNMuqg9fjRDINpA5EKc@ "Charcoal – Try It Online") Link is to verbose version of code. I had about 4 different 32 byte answers then found this. Edit: Saved ~~3~~ 4 bytes by performing the `abs` using string manipulation. Explanation:
```
   ⪪θ-                          Split the input (θ = first input) on -
  ⊟                             Take the (last) element
 Ｉ                              Convert it to a number i.e. abs(θ)
Ｆ     «                         Repeat that many times
       ←ι                       Print half of the -s
         ↓                      Position for the /\s
          →/                    Print the first /
            …\/ι                Print half of any remaining \/s
                ↙               Position for the next row of -s
                 »              End of the loop
                  ‖Ｍ            Mirror everything horizontally
                    ¿‹Ｎ⁰        If the input was negative
                        ‖Ｔ↓     Reflect everything vertically
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~40~~ 38 bytes
*-2 bytes thanks to @Shaggy*
```
o½½@aXc)ç +"--/\\\\/"ò gYv *Ug)pXc aÃ·
```
[Try it online!](http://ethproductions.github.io/japt/?v=1.4.5&code=b729yGMgYVUg5yArIi0tL1xcXFwvIvIgZ7BZdSAqVWcpcFhjIGHDtw==&input=NQ==)
## Explanation
```
o½½@aXc)ç +"--/\\\\/"ò gYv *Ug)pXc aÃ·              // implicit: U = input integer
o.5,.5,XYZ{UaXc)ç +"--/\\\\/"ò gYv *Ug)pXc a} qR    // ungolfed
o.5,.5,                                             // array [.5,U] with step size .5
       XYZ{                                 }       // mapped by the function: (X = value, Y = index)
           UaXc)                                    //   absolute diff between U and ceil(X)
                ç                                   //   " " times that value
                  +"--/\\\\/"ò g      )             //   plus ["--","/\","\/"].get(...
                                Yv                  //     if Y is even, 1, else 0
                                   *Ug              //     times sign(U)
                                       pXc a        //   repeated abs(ceil(X)) times
                                              qR    // all that joined with newlines
```
[Answer]
# [Gaia](https://github.com/splcurran/Gaia), 21 [bytes](https://github.com/splcurran/Gaia/blob/master/codepage.md)
```
:┅“/\\“--”×¦¦_€|ḣ¤ọ×ṣ
```
### Explanation
```
:                      Push 2 copies of the input
 ┅                     Get the range to the input. If positive: [1 .. n]. If negative: 
                       [-1 .. n]. If zero: [0].
  “/\\“--”             Push ["/\", "--"]
          ×¦¦          Repeat both of those strings by each number in the range. Strings go
                       in reverse order when repeated a negative number of times.
             _         Flatten the list
              €|       Centre-align the rows of the list
                ḣ      Remove the last row (the "--"s on the bottom)
                 ¤     Swap (bring input back to the top)
                  ọ    Sign: -1 for negative, 0 for 0, 1 for positive
                   ×   Repeat the list that many times; (-1 × list) reverses it
                    ṣ  Join with newlines and implicitly output
```
[Answer]
# Mathematica, 140 bytes
```
(T=Table;z=Column;B[a_]:=""<>"/\\"~T~a;If[#>0,m=0,m=Pi];z[Join[z/@T[{B@i,""<>"--"~T~i},{i,Abs@#-1}],{B@Abs@#}],Alignment->Center]~Rotate~m)&
```
[Answer]
# [Retina](https://github.com/m-ender/retina), ~~116~~ ~~111~~ 105 bytes
*this got way too long :/*
```
\d+
$*
+`^~?( *1*)1
 $1¶$&¶_$&
.*$
+`(_.*)1
$1--
1
/\
Ts`/\\`\\/`.*~.*
+`(.*)¶((.*¶)*)(~.*)
$2$4¶$1
~|_
```
[Try it online!](https://tio.run/##FYwxDsIwEAT7fUWKU3S@KLYOQc0nKE/YkUJBQwGUyM/yA/wxc6lW2hnN@/F9vrYxbF9AgqXc65UnUQmKibQ3mnvLNCMKwTHneCDSdYUiGW6fksyKWSpRajwS7Epv7NNbkMD@BtCJzl5T1F/GGPXyBw "Retina – Try It Online")
negative input is denoted as `~n`
[Answer]
# [Perl 5](https://www.perl.org/), 100 + 1 (-n) = 101 bytes
```
$/=$_>0?'/\\':'\\/';push@r,$_=$"x--$q.$/x$_,y|/\\|-|r for 1..($q=abs);pop@r;say for$_<0?reverse@r:@r
```
[Try it online!](https://tio.run/##FcpLCsIwEADQqxQZiELz6SKbxthcoDcIhAoRBWnSiUoLObtTXb@XIz41EUgL4aIGJr1nPfNeMpPf5e6whWDhsHIOiwC5Qmi3@kuVV2xuCZtOiCMsdrqWk8kpOzRl2v4C4awGjJ@IJTrsHRLpb8qvR5oL8VEL1Sni8w4 "Perl 5 – Try It Online")
]