Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s='+---+---+---+---+---+---+---+
- | | | | | | | |
- +---+---+---+---+---+---+---+
- | | | R | | | | |
- +---+---+---+---+---+---+---+
- | R | | R | W | | | R |
- +---+---+---+---+---+---+---+
- | R | | W | W | | | W |
- +---+---+---+---+---+---+---+
- | W | W | R | R | | | R |
- +---+---+---+---+---+---+---+
- | W | W | R | R | W | W | R |
- +---+---+---+---+---+---+---+
- | W | W | R | W | R | R | W |
- +---+---+---+---+---+---+---+'.gsub(/.*\+\n/,'').gsub(/ |\n/,'X').tr('| ','')
- %w'W R'.map{|l|[0,6,7,8].map{|n|p l if s=~/(#{l}.{#{n}}){4}/}}
Add Comment
Please, Sign In to add comment