Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. candy = catch(:found) do
  2. floor.each do |row|
  3. row.each do |tile|
  4. throw(:found, tile) if tile == "jawbreaker" || tile == "gummy"
  5. end
  6. end
  7. end
  8.  
  9. candy = search do
  10. floor.each do |row|
  11. row.each do |tile|
  12. return tile if tile == "jawbreaker" || tile == "gummy"
  13. end
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement