Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- candy = catch(:found) do
- floor.each do |row|
- row.each do |tile|
- throw(:found, tile) if tile == "jawbreaker" || tile == "gummy"
- end
- end
- end
- candy = search do
- floor.each do |row|
- row.each do |tile|
- return tile if tile == "jawbreaker" || tile == "gummy"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement