Nurikabe puzzle solver in Ruby