[Question]
  [
## Challenge
Given two digits 0-9 as input, output a domino (from the [double-nine domino set](http://www.domino-games.com/domino-rules/double-nine.html)) with these number of pips (dots) on the two faces. The ten possible faces look like this (separated by pipes):
```
     |     |    o|    o|o   o|o   o|o o o|o o o|o o o|o o o
     |  o  |     |  o  |     |  o  |     |  o  |o   o|o o o
     |     |o    |o    |o   o|o   o|o o o|o o o|o o o|o o o
```
Or on separate lines:
```
     
     
     
-----
     
  o  
     
-----
    o
     
o    
-----
    o
  o  
o    
-----
o   o
     
o   o
-----
o   o
  o  
o   o
-----
o o o
     
o o o
-----
o o o
  o  
o o o
-----
o o o
o   o
o o o
-----
o o o
o o o
o o o
```
## Input formats
You may take input in any reasonable format, including but not limited to:
* Two separate integers, strings, or singleton arrays;
* A single integer from 0-99;
* An array of two integers;
* A string of two digits.
## Output formats
* The two faces may be horizontally aligned, separated by pipes like so:
```
    o|o   o
     |  o  
o    |o   o
```
* Or they may be vertically aligned, separated by hyphens like so:
```
    o
     
o    
-----
o   o
  o  
o   o
```
* You may output a border around the domino if you wish.
* You may also choose to output a list of lines, a list of the two faces, or a combination of these.
* You may use any non-whitespace character for the pips (I used `o`).
* If you really wish, you can use `0` for whitespace and `1` for the pips, or `False`/`True` (or your language's equivalent) if outputting an array.
* You may remove the whitespace between columns; this is a valid output for 7, 7:
```
ooo|ooo
 o | o 
ooo|ooo
```
* Any of the faces may be rotated by 90 degrees. This is also a valid output for 7, 7:
```
o   o|o o o
o o o|  o  
o   o|o o o
```
* You may have as much/little leading/trailing whitespace as you like, as long as the main part of the output still fits the other constraints.
* Each face must be 3 lines tall, even if the lines are empty. For 0, 1 you could not output this:
```
-----
  o
```
But you *could* output this:
```
-----
  o
```
Similarly, if you were outputting a list of two lists of lines, you could do `[["", "", ""], ["", " o", ""]]`, but not `[[""], [" o "]]`.
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so **the shortest code in bytes in each language wins.**
  
[Answer]
# [Python 2](https://docs.python.org/2/), ~~101~~ ~~97~~ ~~92~~ ~~68~~ 64 bytes
```
lambda*a:[[[n>3,n>5,n>1],[n>7,n%2,n>7],[n>1,n>5,n>3]]for n in a]
```
[Try it online!](https://tio.run/##K6gsycjPM/pfahvzPycxNyklUSvRKjo6Os/OWCfPzhSIDWN1gDxznTxVIyDPHMwzhMoZx8am5Rcp5Clk5ikkxv6Hs4sS89JTNQwNNK24FIAAJJ6CRRwECooy80o0SjXydFI0Nf8DAA "Python 2 – Try It Online")
# Credits
* Reduced from 101 bytes to 92 by [Mr. Xcoder](https://codegolf.stackexchange.com/users/59487/mr-xcoder)
* Reduced from 92 bytes to 68 by [Jonathan Allan](https://codegolf.stackexchange.com/users/53748/jonathan-allan) ([Dennis](https://codegolf.stackexchange.com/users/12012/dennis))
* Reduced from 68 bytes to 64 by [totallyhuman](https://codegolf.stackexchange.com/users/68615/totallyhuman)
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~252~~ ~~242~~ ~~269~~ ~~262~~ ~~241~~ ~~235~~ 220 bytes
I was on stack overflow for sockets in python, when this popped up, said why not? first code golf, so i'm not entirely sure if I followed the rules 100% (and if not and someone wants to steal my proverbial cookie and fix it, so be it). With 'o' and ' ', ~~255 245 272 265 244 238~~ 228 bytes. replace +48 with \*79+32.
```
#define Q(P,R)(R>>P&1)+48
char a[11];i=0;f(char*c){char b=c[0];a[3]=a[7]='\n';a[5]=Q(0,b);a[1]=a[9]=Q(3,b);a[2]=a[8]=Q(2,b)|a[1];a[0]=a[10]=Q(1,b)|a[2];a[4]=a[6]=a[1]|Q(2,b)&Q(1,b);puts(a);if(i++<1){puts("---");f(c+1);}}
```
[Try it online!](https://tio.run/##Tc9NbsMgEAXgPadAiZRAbVdgu00qgs@QZOuyIPgnSCmtHKcbx2enDN6U1eN7gzSYrDfGr60zt0fT4sN9HKzrX68V@m@N/Q7k103bWdfiEzmmZ0rOVXXccJqUe2SuesC65lwJK5noCMCLoVMsLtLUTAldF0rqeqfk9tNtw/VNyRNh6YWGzKH6ACgWyAH2AHmAJ0wEZaCcAfOFc@AS@D126rm82CwT4ucx3ommwnbEJsmB0ynKKsuyFYVNE07FPHvrRvylrSMQ9NCbFMdPQP6tFaZoQjicjkTgigo0e1@Ufw "C (gcc) – Try It Online")
How it works:  
I use a bit shift and bitwise and to find if a spot should be clear or a pip, then offset the 0 or 1 to the correct ASCII value. it messes up on 4 and 5, so they needed some fixing. actually added a few bytes. was able to remove several bytes by removing a mask and just using 1 (doh)
Special thanks to Mr. Xcoder for the 7 less bytes by removing an excess #define  
Changes: removed memset -21 bytes. redid the bit logic for 6, 4, 2 to depend on 8|4&2, 8|4, 8|4|2, respectively. -6 bytes. removed extra newlines by using puts instead of printf, which is also shorter. shortened the array to 11, removing extra assignment. -15 bytes. NOW I think that's the best I can do.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 20 bytes
```
“¤o.ƤẸʠṚ’B¬s5ŒBị@s€3
```
[Try it online!](https://tio.run/##ATMAzP9qZWxsef//4oCcwqRvLsak4bq4yqDhuZrigJlCwqxzNcWSQuG7i0Bz4oKsM////zQsIDI "Jelly – Try It Online")
### Alternate version, original output, ~~33~~ ~~32~~ 31 bytes
```
“¤o.ƤẸʠṚ’ṃ⁾ os5ŒBị@s€3K€€Zj€”|Y
```
*Thanks to @user202729 for golfing off 1 byte!*
[Try it online!](https://tio.run/##y0rNyan8//9Rw5xDS/L1ji15uGvHqQUPd8561DDz4c7mR437FPKLTY9Ocnq4u9uh@FHTGmNvIAFEUVkgumFuTeT///8NdBQMdRSMdBSMdRRMdBRMdRTMdBTMdRQsdBQsAQ "Jelly – Try It Online")
### How it works
First, `“¤o.ƤẸʠṚ’` – an integer literal in bijective base 250 – sets the return value to **1086123479729183**.
Then, `B¬` converts the return value to binary and takes the logical NOT of each digit, yielding the array
```
00001001000010110100101011110011101111101111100000
```
Next, `s5ŒB` splits that array into chunks of length **5**, then *bounces* each chunk, turning **abcde** into **abcdedcba**, yielding
```
000010000 001000100 001010100 101000101 101010101
111000111 111010111 111101111 111111111 000000000
```
Now, `ị@` retrieves the **j**th and **k**th item of this array, where **j, k** is the program's first argument. Note that indexing is 1-based and modular, so the zeroth element is also the tenth.
Finally, `s€3` splits each chunk of length nine into three chunks of length three.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 13 bytes
```
⁽½ÑD<;ḂŒBs3µ€
```
[Try it online!](https://tio.run/##ATYAyf9qZWxsef//4oG9wr3DkUQ8O@G4gsWSQnMzwrXigqz///9bMCwxLDIsMyw0LDUsNiw3LDgsOV0 "Jelly – Try It Online")
Combining [Dennis](https://codegolf.stackexchange.com/users/12012/dennis)' idea of using `ŒB` (bounce) in [this answer](https://codegolf.stackexchange.com/a/151594) and [Xcali](https://codegolf.stackexchange.com/users/72767/xcali)'s observation in [this answer](https://codegolf.stackexchange.com/a/151598) to get 13 bytes.
---
# [Jelly](https://github.com/DennisMitchell/jelly), 28 bytes
(with pretty printing)
Only now do I know that Jelly string literal is automatically terminated...
```
⁽½ÑD<;ḂŒBị⁾o Ks6Yµ€j“¶-----¶
```
[Try it online!](https://tio.run/##y0rNyan8//9R495Dew9PdLGxfrij6egkp4e7ux817stX8C42izy09VHTmqxHDXMObdMFgUPb/v//H22gY6hjpGOsY6JjqmOmY65joWMZCwA "Jelly – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/), ~~107 76 70~~ 67 ~~+ 1 (`-a`)~~ = 67 bytes
```
$,="
---
";say map{'351
7 7
153'=~s/\d/$_>$&||0/ger=~s/ /$_%2/er}<>
```
[Try it online!](https://tio.run/##K0gtyjH9/19Fx1aJS1dXl0vJujixUiE3saBa3djUkMtcwZzL0NRY3bauWD8mRV8l3k5FrabGQD89tQgkpAAUUTXSTy2qtbH7/9@Yy@RffkFJZn5e8X9dX1M9A0MDAA "Perl 5 – Try It Online")
Uses 0 for whitespace and 1 for pips. Pretty simple method: observe that as the digit goes up, once a pip is "on", it never goes "off," except for the one in the middle. In the middle position, it is on for all odd numbers. Thus, for each position, it's a simple matter of checking if the digit is greater than the last digit for which it is off. The `||0` creates output when the condition is false. In Perl, false is `undef` which outputs as null.
[Answer]
# PHP ~~155~~, 150 bytes
```
function d($a){foreach($a as$n){$o="---";for($i=0;$x=2**$i,$i<9;++$i)$o.=([0,16,68,84,325,341,365,381,495,511])[$n]&$x?0:' ';echo chunk_split($o,3);}}
```
It takes an array of integers as the input. For testing:
```
d([1,2]);
echo "=========\n";
d([0,1,2,3,4,5,6,7,8,9]);
```
Output Format:
```
---
   
 0 
   
---
  0
   
0  
```
Check it out [live here](http://sandbox.onlinephpfunctions.com/code/55762d92e136678df328ecd8da411888a6335c80)
**My Solution**
For my solution I used a matrix consisting of [bitwise](http://php.net/manual/en/language.operators.bitwise.php) numbers ( powers of 2 ). It can be visualized like this:
```
 1  |  2  |  4
 8  | 16  | 32
 64 | 128 | 256
```
And then a storage array consisting of the bit positions for the pips of each domino correlated by the numbered index:
```
[0,16,68,84,325,341,365,381,495,511]
```
So just to clarify:
* example 0: index `0` or value `0` would be the blank domino, which is always false.
* example 1: index `1` or value `16` would be the number one domino and in the matrix that is in the center `16`.
* example 2: index `2` or value `68` would be the number two domino and in the matrix that is top right `4` and bottom left `64` or `4|64`
* example 3: index `5` or value `341` would be the number five domino and in the matrix that is `1|4|16|64|256`
* example 4: index `9` or value `511` would be the number nine domino and in the matrix its the combination of all the bits.
Once that is established it's a fairly simple matter of looping for the 9 positions in the matrix, and setting `$x` to `2` to the [power](http://php.net/manual/en/function.pow.php) of `$i`
```
for($i=0;$x=2**$i,$i<9;++$i)
```
Then we do a bitwise And `&` as we iterate through those spots. So for examples sake will use example 2 from above and I will use `x`'s instead spaces for sake of visual clarity:
* iteration 1, `68 & 1 ? 0 : 'x'` which results in `'x'`
* iteration 2, `68 & 2 ? 0 : 'x'` which results in `'x'`
* iteration 3, `68 & 4 ? 0 : 'x'` which results in `0`
* iteration 4, `68 & 8 ? 0 : 'x'` which results in `'x'`
* iteration 5, `68 & 16 ? 0 : 'x'` which results in `'x'`
* iteration 6, `68 & 32 ? 0 : 'x'` which results in `'x'`
* iteration 7, `68 & 64 ? 0 : 'x'` which results in `0`
* iteration 8, `68 & 128 ? 0 : 'x'` which results in `'x'`
* iteration 9, `68 & 256 ? 0 : 'x'` which results in `'x'`
When the loop is complete we wind up with this string `"xx0xxx0xx"`.
Then we add the border `"---xx0xxx0xx"` to it *( I actually start with the border, but whatever)*.
And finally we [chunk\_split()](http://php.net/manual/en/function.chunk-split.php) it on 3's for:
```
---
xx0
xxx
0xx
```
Feel free to let me know what you think.
[Answer]
# JavaScript (ES6), ~~79~~ 78 bytes
*Saved 1 byte thanks to @ETHproductions*
Takes input in currying syntax `(a)(b)` and outputs a vertical ASCII domino.
```
a=>b=>(g=n=>`351
707
153`.replace(/./g,d=>' o'[(+d?n>d:n)&1]))(a)+`
---
`+g(b)
```
### Demo
```
let f =
a=>b=>(g=n=>`351
707
153`.replace(/./g,d=>' o'[(+d?n>d:n)&1]))(a)+`
---
`+g(b)
console.log(f(4)(2))
console.log(f(3)(7))
```
---
# Horizontal version, ~~80~~ 79 bytes
*Saved 1 byte thanks to @ETHproductions*
Takes input as an array of 2 integers and outputs a horizontal ASCII domino.
```
a=>`240|351
686|797
042|153`.replace(/\d/g,d=>' o'[(d<8?(x=a[d&1])>(d|1):x)&1])
```
### Demo
```
let f =
a=>`240|351
686|797
042|153`.replace(/\d/g,d=>' o'[(d<8?(x=a[d&1])>(d|1):x)&1])
console.log(f([4,2]))
console.log(f([3,7]))
```
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 25 bytes
```
2∘|(3 3⍴⊢,,∘⌽)¨>∘3 5 1 7¨
```
[Try it online!](https://tio.run/##jcw9SgNBHIbxfk8xZQIRMvOfz8Yb2HmBJW5CIGzEjYWorUhwxUawsdEmhaWWNjnKXGTdPGK0tHnmA35vebo4OLkoF8tZ15l8@3Q1ECW5fc/rl9Gof@e7z@F2c9jfRDmlVdhuutw@q6NyXqvpeT1ZzZd1UUxVvnlQ/xwoit3CcdWsqrM/GzM2LvP9Y3/m9i2vX7/v08H@b9jP/jw@rn@H1KRsqma3MVZjqqmhQi111NNAI019NVZjNVZjNVZjNVZjNVZjDdZgDdZgDdZgDdZgDdZgBStYwQpWsIIVrGAFK1iLtViLtViLtViLtViLtViHdViHdViHdViHdViHdViP9ViP9ViP9ViP9ViP9diADdiADdiADdiADdiADdiIjdiIjdiIjdiIjdiIjdiETdiETdiETdiETdiETSp1Xw "APL (Dyalog Unicode) – Try It Online")
-2 thanks to [ngn](https://codegolf.stackexchange.com/users/24908/ngn).
The output format is a little bit weird: this function returns an array containing two shape-3,3 arrays each containing 0s and 1s.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~115~~ 113 bytes
-2 bytes thanks to ceilingcat
```
i;g(x){for(i=0;9/++i;)printf("%c%c",32+(i^5?x>" CEAG@GAEC"[i]%8:x%2),i%3?32:10);}f(a,b){g(a),puts("-----"),g(b);}
```
[Try it online!](https://tio.run/##dY7LCsJADEXX7VeEgYGEmWJtEWzHJyJ@hA@oIy1ZWMUHFEq/vaYu3BkCF@4huddHlfd9z67Chtry9kCexy4bGcOO7g@uXyUq7bVXNk0M8mmybBYKNtv1brVbbzdqz0c9zRudkGWdLtMkH8fkuhILe6a2woLs/f16ooqGUWQrPAvv5TNcC66RwjYMJBhwsBjmEDuRGWQixlAYCA9@VS6gL/mhVhZYFgyMyQ38m2EkwqivUeI/LseD1YVd/wE "C (gcc) – Try It Online")
[Answer]
# Javascript (ES6), 87 bytes
```
a=>b=>[(s=n=>[[n>3,n>5,n>1],[n>7,n%2,n>7],[n>1,n>5,n>3]].map(c=>c.map(b=>+b)))(a),s(b)]
```
```
f=a=>b=>[(s=n=>[[n>3,n>5,n>1],[n>7,n%2,n>7],[n>1,n>5,n>3]].map(c=>c.map(b=>+b)))(a),s(b)]
```
```
<div oninput="o.innerText=JSON.stringify(f(a.value)(b.value))"><input id=a type=number min=1 max=9 value=1><input id=b type=number min=1 max=9 value=1><pre id=o>
```
[Answer]
# Haskell - 88 characters
```
map$zipWith(zipWith($))[[(>4),(>5),(>1)],[(>7),odd,(>7)],[(>1),(>5),(>3)]].repeat.repeat
```
Takes a list of two numbers indicating the faces, returns a list of list of list of bool. Not that short but I find the solution interesting.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 16 bytes
```
>⁽¤xb8¤;ḂŒḄs3
Ç€
```
[Try it online!](https://tio.run/##ASwA0/9qZWxsef//PuKBvcKkeGI4wqQ74biCxZLhuIRzMwrDh@KCrP///1szLCA3XQ "Jelly – Try It Online")
Used [Neil's strategy](https://codegolf.stackexchange.com/a/151604/77748) and base decompression to generate the values; outputs as a binary array. Takes a list as input.
Explanation:
```
Ç€
 € for €ach input,
Ç  execute the previous line.
>⁽¤xb8¤;ḂŒḄs3
 ⁽¤xb8¤       the array [3, 5, 1, 7]
>             1 if the input is greater than each element, 0 otherwise
       ;Ḃ     append input % 2
         ŒḄ   bounce array
           s3 split into chunks of 3
```
[Answer]
# [Pip](https://github.com/dloscutoff/pip), ~~32~~ ~~27~~ ~~24~~ 21 bytes
-3 bytes thanks to @DLosc
```
FcgP[Yc>_M3517c%2RVy]
```
[Try it online!](https://tio.run/##K8gs@P/fLTk9IDoy2S7e19jU0DxZ1SgorDL2////Jv9NAQ "Pip – Try It Online")
### Explanation:
```
F                      For each
 c                       character $c
  g                      in the list of inputs:
   P                     Print
    [               ]      an array consisting of
                             an array of bits representing whether
      c>                       $c is greater than
        _M                       each of
          3517                     3, 5, 1, and 7
     Y                       (call this bit array $y),
              c%2            $c mod 2,
                 RV          and the reverse
                   y           of $y.
```
[Answer]
# [><>](https://esolangs.org/wiki/Fish), 57+3 = 60 bytes
```
>{:3)$:5)$:1)$:7)$:2%$\ao \
\?%cl999)3$)5:$)1:$)7:/nnn<rp
```
[Try It Online](https://tio.run/##DcNBCoAgEAXQfadoMS5mEaVmNhJ1ETcRREFYFLTp8D8fvHV/NmD8gmUKLte5z42iOJ9lLOKklkNE2BK7QKxzH@qU0nBfAKoXDTQMLFo4dPDoIWh@). Outputs as a vertical domino with 1s for dots, 0s for whitespace and 9s for separators like so:
```
001
000
100
999
111
111
111
```
Technically this can be extended to up to 12 inputted values.
## Old Version:
## [><>](https://esolangs.org/wiki/Fish), 76+3 = 79 bytes
```
>{:3)$:5)$:1)$a$:7)$:2%$:7)\&?o~?!n\
\?(*a3la"---"a)3$)5:$)1:$a$/$&:)9::<r~p
```
[Try It Online](https://tio.run/##S8sszvj/367aylhTxcoUiA01VRJVrMyBLCNVEB2jZp9fZ6@YF8MVY6@hlWick6ikq6urlKhprKJpaqWiaWgFVK@vomalaWllZVNUV/D//3/dsv9G/y0B). Outputs as a vertical domino with 1s for dots and 0s for whitespace like so:
```
001
000
100
---
111
111
111
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~46~~ ~~44~~ ~~43~~ 39 bytes
```
ＥＥ²℅§@APQTUVW^_ＮＥ⪪Ｅ⁹§ o÷ιＸ²↔⁻⁴λ³⪫λ Ｍ⁵↑⁵
```
[Try it online!](https://tio.run/##PY7BCsIwEETvfsWS0wbipVpEe7HgpUK1otWbkrYBAzEJbVr9@xhbcGAOs/Bmp37ytjZceV@0UjvMuR0dMTi2jdRcYeoy3YgPkm1anC7l9XZ/EAaZtr079K9KtEiDGPyws1VyKlkz@INgRsDt5CAbgZJBYd6BC0/SqsNc6r7DJQNF6VS1CN4bqVExIEDCLZnlZhAYM9iUNqRpbUwT76PZys8H9QU "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
ＥＥ²℅§@APQTUVW^_Ｎ
```
Read two integers and map them in the lookup table. Then map over the result. (This effectively captures the result in a temporary.)
```
  Ｅ⁹                Loop `l` (!) from 0 to 8
            ⁻⁴λ     Subtract from 4
           ↔        Absolute value
         Ｘ²         Power of 2
       ÷ι           Divide into the looked-up value `i`
    § o             Convert to space or o
 ⪪             ³    Split into (3) groups of 3
Ｅ                   Map over each group
                ⪫λ  Join the 3 characters with spaces
```
The results are then implicitly printed on separate lines, with an extra blank line between each face because the results are nested.
```
Ｍ⁵↑⁵
```
Move up and draw the dividing line in between the faces.
Previous 43-byte horizontal version:
```
↶Ｐ³Ｍ⁷←ＦＥ²℅§@APQTUVW^_ＮＦ⁹«Ｆ¬﹪κ³⸿⸿§ o÷ιＸ²↔⁻⁴κ
```
[Try it online!](https://tio.run/##PY7LCsIwEEXX7VcMXU0hblQQdWPBjWC1go@NKNVGDMZMiUkVxG@PaQTvau487pnztdRnKqVzhWjIzPnFYDqOcyuNqLVQBnutpYbjgMGonXt/IQ2YlzV2GSx1JVQpMTMzVfEXJpOsWK03293hmDCYqdqahb2fuMbUC8LpMIV3HEWhXpDBnCorCW8Meu1OEcDJXu914mlR9Gv8CUAh2UxFIyqOgkFBTw/w32SnB@ZC2Qf2GdzSoHH8ca4bD1ynkV8 "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
↶
```
Work vertically.
```
Ｐ³
```
Print the dividing line.
```
Ｍ⁷←
```
Position to the start of the first face.
```
ＦＥ²℅§@APQTUVW^_Ｎ
```
Read two integers and map them in the lookup table.
```
Ｆ⁹«
```
Prepare to output up to 9 `o`s.
```
Ｆ¬﹪κ³⸿⸿
```
But start a new column every three `o`s.
```
§ o÷ιＸ²↔⁻⁴κ
```
Convert the lower 5 bits of the ASCII code to binary, and then mirror the output for the remaining 4 `o`s.
[Answer]
# [Chip](https://github.com/Phlarx/chip), ~~142~~ 135 bytes
```
! CvDvB
>v-]-x.
|Z-]-]e
|Z]xe|
|ZR(-'
|Zx.AD
|Zxx]x.
|Zx^-]e
|Z<,(-.
|Zx]xe|
|Zx-]-]e
|Zx-]-x'
|Z<C^D^B
|>x~s
|Zx.
|Zx<
|Zxb
|Z+^~f
`zd
```
[Try it online!](https://tio.run/##S87ILPj/X1HBucylzInLrkw3VrdCj6smCkjHpgLp2IrUGiAVpKGrDqQq9BxdQFRFLFhRRRxEkY2Ohi6YD1VdAdMNYlSANNo4x7nEOXHV2FXUFYPNARE2ICIJSGjH1aVxJVSl/P9vZAoA "Chip – Try It Online")
Input is a string of digits. Uses zeroes as the pips. Draws the pips for one number, reads next input byte. If no next byte, terminate, else draw the divider and go to start.
Each `Z` (or `z`) corresponds to one character of output, they are positioned to fire in order top to bottom. The capitalized `A`, `B`, `C`, and `D` correspond to the low four bits of the input (that's all we look at, so `"34" == "CD" == "st" ...`). The lowercase `b`, `d`, `e`, `f` correspond to various bits of the output.
Can make infinite-length dominoes too; try giving `0123456789` as input.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~150~~ ~~146~~ 145 bytes
* Saved ~~four~~ five bytes thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat).
```
#define p(x)printf(" %c",33-(x)),
P(a){p(a<4)p(a<6)p(a<2)p(23)p(a<8)p(~a&1)p(a<8)p(23)p(a<2)p(a<6)p(a<4)p(23)0;}f(a,b){P(a),puts(" -----"),P(b);}
```
[Try it online!](https://tio.run/##XY3RCoJAEEWf8ytko5iBEXS1MrYv6MlfWDdXfEiWMggW/fVtVyPCeTjcOVxmVNIq5dz21uiub2IDbzSPrh80sHinGOV54hVSVIFEa0BeCgw8zuSePJ9j6TnJffZbvp7/1YtFp2LUIKlGG46SeQ1P/y0Jw5AqqFGM7i67Hq5oo42GjE4oltrEUASV0nmtDpSuVUGlD6P7AA "C (gcc) – Try It Online")
[Answer]
## Javascript (ES5), 103 characters
```
(a,b,h=(y=7)=>
  ' o   o ooo'.slice(+y,+y+3))=>
    ['223355','242424245','221155'].map(z=>
      h(z[a])+'|'+h(z[b]))
```
Linebreaks and whitespace inserted for readability.
[Answer]
# APL+WIN,  ~~49~~  47 bytes
```
4⌽'|',⌽⍉6 3⍴,⍉(9⍴2)⊤(+\∊0 241 52 24 114,¨16)[⎕]
```
Edited as per Adam's comment, thanks, to run with index origin zero.
Prompts for screen input as a vector of integers one for each face.
The output is of the form:
```
1 1 1 | 0 0 1    0 0 0 | 1 0 1
0 1 0 | 0 1 0    0 0 0 | 0 1 0
1 1 1 | 1 0 0    0 0 0 | 1 0 1
```
for an inputs of `7 3` and `0 5`
Explanation:
```
(+\∊0 241 52 24 114,¨16) create a vector of integers whose binaries
                         represent the dots on the domino faces
[1+⎕] take input integers as indices to select from above vector
⍉6 3⍴,⍉(9⍴2)⊤ convert selected integers to a 9x2 binary matrix and reshape
              to match the orientation of the domino faces
4⌽'|',⌽ rotate, concatenate centre line markers and rotate again to centre 
```
[Answer]
# [Python 2](https://docs.python.org/2/), 121 bytes
```
lambda x,y,d="001155777702020202570044557777":[("%03d"%int(bin(int(o))[2:]),"---")[o=="3"]for o in d[x::10]+"3"+d[y::10]]
```
[Try it online!](https://tio.run/##RctBCoMwEAXQvacIA0KCI0zUaBvISdIslCAV2kTEhZ4@tZXi/MXnfZh5X58xVGk0j/Tq34Pv2YY7egNEUirVHUfVGdURNc25gbYccqo95FNY@TAF/u0ohK20EwhlWYKw0RiowY1xYZFNgXm7aS3JFcdaeLv/4NK8HM9s5IS1yP5osLug8HZB4v1Ci63I0gc "Python 2 – Try It Online")
Reduced to 121 using a lambda after going back and re-reading the rules. Now outputs a list of lines.
Previous version with nicely formatted output:
# [Python 2](https://docs.python.org/2/), ~~156~~ ~~153~~ ~~147~~ 141 bytes
```
x,y=input()
d="001155777702020202570044557777"
a=["%03d"%int(bin(int(o))[2:])for o in d[x::10]+d[y::10]]
for x in a[:3]+["---"]+a[3:]:print x
```
[Try it online!](https://tio.run/##JYzBCoQgGITvPoUIgVLCnxWR4JP866FFlvWiEQb69G5uM4cZ5oM5SvrGoOplXjUPxfhwXIkL4gwDGMdlWW@BerysAPP8bIzsBlkHk2OdD4m/feAtoxCotBWfeNJIfaAOs9Yj2N5h@RdLGsuN7agn2yOTUjLb7zhpq4/zvqG5Vhi2Hw "Python 2 – Try It Online")
-3 with thanks to @NieDzejkob
Takes input as 2 integers and outputs in vertical format with 0=space and 1=dot.
[Answer]
# [Pyt](https://github.com/mudkip201/pyt), ~~220~~ 154 [bytes](https://github.com/mudkip201/pyt/wiki/Codepage)
Second attempt (154 bytes)
```
46281ᴇ8264áĐ9ř3%¬Đ¬2⁵*⇹1ᴇ*+03Ș←Đ3Ș≥Đ6²⁺3**⇹¬2⁵*+⇹9ř5=⇹2%*9²2-*+⇹9ř9<*Ž⇹ŕ⇹9ř3%¬Đ¬2⁵*⇹1ᴇ*+03Ș←Đ3Ș≥Đ6²⁺3**⇹¬2⁵*+⇹9ř5=⇹2%*9²2-*+⇹9ř9<*Ž⇹ŕ5⑴9△*Ƈǰ⇹Ƈǰ64ȘƇǰ6↔ŕ↔ŕ↔
```
Explanation:
```
46281ᴇ8264áĐ                                    Pattern matching for every cell but the middle
9ř3%¬Đ¬2⁵*⇹1ᴇ*+03Ș                              Non-pip characters
←Đ3Ș≥Đ6²⁺3**⇹¬2⁵*+⇹9ř5=⇹2%*9²2-*+⇹9ř9<*Ž⇹ŕ⇹     Make top cell
9ř3%¬Đ¬2⁵*⇹1ᴇ*+03Ș                              Non-pip characters
←Đ3Ș≥Đ6²⁺3**⇹¬2⁵*+⇹9ř5=⇹2%*9²2-*+⇹9ř9<*Ž⇹ŕ      Make bottom cell
5⑴9△*Ƈǰ⇹Ƈǰ64ȘƇǰ6↔ŕ↔ŕ↔                          Make boundary and combine
```
  
---
First attempt (220 bytes):
```
2`↔←Đ4≥Đ6²⁺3**⇹¬5«+2⁵⇹3ȘĐ6≥Đ6²⁺3**⇹¬5«+2⁵⇹3ȘĐ2≥Đ6²⁺3**⇹¬5«+1ᴇ⇹3ȘĐ8≥Đ6²⁺3**⇹¬5«+2⁵⇹3ȘĐ2%Đ6²⁺3**⇹¬5«+2⁵⇹3ȘĐ8≥Đ6²⁺3**⇹¬5«+1ᴇ⇹3ȘĐ2≥Đ6²⁺3**⇹¬5«+2⁵⇹3ȘĐ6≥Đ6²⁺3**⇹¬5«+2⁵⇹3Ș4≥Đ6²⁺3**⇹¬5«+1ᴇ9△ĐĐĐĐ1ᴇ↔⁻łŕ↔ŕŕŕŕŕŕáƇǰ
```
Explanation:
```
2                           Push 2 (this is how many 'cells' to make)
`     ... ł                 While the top of the stack is not zero, loop
↔                           Flip the stack (useless at the beginning, undoes the flip at the end of the loop)
←Đ4≥Đ6²⁺3**⇹¬5«+            Set top-left pip
2⁵⇹3Ș                       Space
Đ6≥Đ6²⁺3**⇹¬5«+             Set top-middle pip
2⁵⇹3Ș                       Space
Đ2≥Đ6²⁺3**⇹¬5«+             Set top-right pip
1ᴇ⇹3Ș                       New line
Đ8≥Đ6²⁺3**⇹¬5«+             Set middle-left pip
2⁵⇹3Ș                       Space
Đ2%Đ6²⁺3**⇹¬5«+             Set center pip
2⁵⇹3Ș                       Space
Đ8≥Đ6²⁺3**⇹¬5«+             Set middle-right pip
1ᴇ⇹3Ș                       New line
Đ2≥Đ6²⁺3**⇹¬5«+             Set bottom-left pip
2⁵⇹3Ș                       Space
Đ6≥Đ6²⁺3**⇹¬5«+             Set bottom-middle pip
2⁵⇹3Ș                       Space
4≥Đ6²⁺3**⇹¬5«+              Set bottom-right pip
1ᴇ                          New line
9△ĐĐĐĐ                      Add 5 dashes
1ᴇ                          New line
↔⁻ł                         Decrement counter (if >0, loop; otherwise, exit loop)
ŕ↔ŕŕŕŕŕŕ                    Remove all unnecessary items on the stack
áƇǰ                         Push stack to an array, get characters at unicode codepoints given by values in the array, join characters with empty string
```
  
[Try it online!](https://tio.run/##K6gs@f/fKOFR25RHbROOTDB51Ln0yASzQ5seNe4y1tJ61L7z0BrTQ6u1jR41bgVyjE/MAMoSocYIhxrDh1vaYWosiDFHlZAKCyJsMqKKr0zw2GT5aNrmIxMgEGwzMDwbdx9tOjoVyDo6FQEPLzzWfnwDMMi5jAE)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 34 bytes
```
•ΩõIº•R2ô¹2÷è¹È-bDg5s-ú.∞3ô»TR„ o‡
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UcOicysPb/U8tAvICjI6vOXQTqPD2w@vOLTzcIdukku6abHu4V16jzrmGQOldocEPWqYp5D/qGHh//@mAA "05AB1E – Try It Online")
---
This was difficult because 05AB1E has bad padding.
---
Basic explanation:
* There are 4 significant patterns here which are 2, 4, 6 and 8.
* 3,5,7 and 9 are the other patterns plus 1.
* 1 is not significant due to symmetry, if the input is even, subtract 1 to toggle the middle bit.
* Toggling the LSB allows the middle bit to be flipped due to mirroring.
[Answer]
# SmileBASIC, ~~92~~ 69 bytes
```
INPUT N,M
DEF Q?N>3;N>5;N>1?N>7;1AND N;N>7?N>1;N>5;N>3
END
Q?777N=M
Q
```
Example:
```
? 7,2
111
010
111
777
001
000
100
```
This is what happens when your rules aren't strict enough.
[Answer]
# FALSE, ~~116~~ ~~80~~ ~~78~~ ~~70~~ ~~69~~ ~~66~~ ~~63~~ ~~61~~ ~~59~~ 58 bytes
```
[$3[>_$.\$]$p:!5p;!1p;!"
"7p;!%1&.."
"..."
"]$s:!"---
"s;!
```
still working on this...
[Answer]
# PHP, 116 bytes
```
while($i<6)echo strtr(sprintf("%03b",[_011557777,_202020267,_044557777][$i/2][$argv[$i%2+1]]),10,"o "),"|
"[$i++%2];
```
requires PHP 5.5 or later. Run with `-nr` or [try it online](http://sandbox.onlinephpfunctions.com/code/cec3cd33beca4e0ccaf4bee58ee8b4afc7f1fba3).
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal) `j`, 41 bytes
```
»⟑-⁰ɖṄwi⁋ǏSżƛ»b9ẇ:£?i¥?i3(2p)Jƛ`o -`$i;3ẇ
```
[Try it Online!](https://lyxal.pythonanywhere.com?flags=j&code=%C2%BB%E2%9F%91-%E2%81%B0%C9%96%E1%B9%84wi%E2%81%8B%C7%8FS%C5%BC%C6%9B%C2%BBb9%E1%BA%87%3A%C2%A3%3Fi%C2%A5%3Fi3%282p%29J%C6%9B%60o%20-%60%24i%3B3%E1%BA%87&inputs=1%0A3&header=&footer=)
A mess.
]