Using the fewest Unicode characters, write a function that accepts three parameters:
- Total number of dominoes
n
th affected domino- Topple direction of the affected domino (
0
orL
for left,1
orR
for right)
Once a domino is toppled, it must also topple the remaining dominoes in the same direction.
You should output the dominoes with |
representing a standing domino and \
and /
representing a domino toppled to the left and right respectively.
Examples
10, 5, 1
should return ||||//////
6, 3, 0
should return \\\|||
if(third_parameter)
instead ofif(third_paramter=='l')
\$\endgroup\$