Guest User

Untitled

a guest
Jul 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. s='+---+---+---+---+---+---+---+
  2. | | | | | | | |
  3. +---+---+---+---+---+---+---+
  4. | | | R | | | | |
  5. +---+---+---+---+---+---+---+
  6. | R | | R | W | | | R |
  7. +---+---+---+---+---+---+---+
  8. | R | | W | W | | | W |
  9. +---+---+---+---+---+---+---+
  10. | W | W | R | R | | | R |
  11. +---+---+---+---+---+---+---+
  12. | W | W | R | R | W | W | R |
  13. +---+---+---+---+---+---+---+
  14. | W | W | R | W | R | R | W |
  15. +---+---+---+---+---+---+---+'.gsub(/.*\+\n/,'').gsub(/ |\n/,'X').tr('| ','')
  16. %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