Challenge
Given two digits 0-9 as input, output a domino (from the double-nine domino set) 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 and1
for the pips, orFalse
/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, so the shortest code in bytes in each language wins.
[2, 1]
, I could output[[[0,0,1],[0,0,0],[1,0,0]],[[0,0,0],[0,1,0],[0,0,0]]]
? \$\endgroup\$[0,5,21,29,31]
are all important numbers here my friends. \$\endgroup\$