Guest User

Untitled

a guest
Jul 19th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.29 KB | None | 0 0
  1. floor = [["blank", "blank", "blank"],
  2.          ["gummy", "blank", "blank"],
  3.          ["blank", "blank", "blank"]]
  4.  
  5. def search(plan)
  6.   plan.each do |row|
  7.     row.each do |tile|
  8.       return tile if tile == "jawbreaker" || tile == "gummy"
  9.     end
  10.   end
  11. end
  12.  
  13. candy = search(floor)
  14.  
  15. p candy
Advertisement
Add Comment
Please, Sign In to add comment