Cribbage is an interesting game, because you need a specific board to score your game. A cribbage board looks like this:
Notice how the first column is on the left as it goes up, then on the right as it goes down, then back on the left as it goes up again.
And here is what a poorly drawn rendered ASCII art of a cribbage board looks like:
* * *
----------- -------
/ * \ |*|*|*|
/* * *\ |*|*|*|
/ * * * \ |*|*|*|
| * * | |*|*|*|
|* * * * * *| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
* * * |* * * * * *|
| * * |
\ * * * /
\* * */
\ * /
-----------
Here is your challenge:
Step 1: Draw this ASCII art of a cribbage board. Trailing whitespace is OK, provided that there is no visible difference.
Step 2: Given three integers as input, display each peg in the correct hole. The pegs can be 0-indexed or 1-indexed. The inputs will be in [0-121]
inclusive. You can take these inputs in any reasonable manner, for example, 3 separate inputs, an array, command line arguments, etc. Here's an example for the input (0, 37, 100)
(1-indexed):
* * *
----------- -------
/ * \ |*|*|*|
/* * *\ |*|*|*|
/ 2 * * \ |*|*|*|
| * * | |*|*|*|
|* * * * * *| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|3|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
1 * * |* * * * * *|
| * * |
\ * * * /
\* * */
\ * /
-----------
Step 3: Output the whole thing.
Test IO:
Since each of these is pretty vertically tall, I will only include 2, but you can see more at this github gist.
#Input: (56, 56, 56)
#Output:
* * *
----------- -------
/ * \ |*|*|*|
/* * *\ |*|*|*|
/ * * * \ |*|*|*|
| * * | |*|*|*|
|* * * * * *| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |3|2|1| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
* * * |* * * * * *|
| * * |
\ * * * /
\* * */
\ * /
-----------
#Input: (120, 89, 23)
#Output:
* * *
----------- -------
/ * \ |1|*|*|
/* * *\ |*|*|*|
/ * * * \ |*|*|*|
| * * | |*|*|*|
|* * * * * *| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|3| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|2|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
|*|*|*| |*|*|*| |*|*|*|
------- ------- -------
* * * |* * * * * *|
| * * |
\ * * * /
\* * */
\ * /
-----------
Standard loopholes apply, and the shortest answer in bytes wins!