Code Golf: Ghost Leg
- by Anax
The challenge
The shortest code by character count that will output the numeric solution, given a number and a valid string pattern, using the Ghost Leg method.
Examples
Input: 3,
"| | | | | | | |
|-| |=| | | | |
|-| | |-| |=| |
| |-| |-| | |-|"
Output: 2
Input: 2,
"| | |=| |
|-| |-| |
| |-| | |"
Output: 1
Clarifications
Do not…