-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this message was sent. 2. Support Ruby Quiz by submitting ideas and responses as often as you can! Visit: http://rubyquiz.strd6.com/suggestions 3. Enjoy! Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone on Ruby Talk follow the discussion. Please reply to the original quiz message, if you can. RSS Feed: http://rubyquiz.strd6.com/quizzes.rss -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Plot the Shape (#211) Kvetha Rubyists, This week's quiz was submitted by Alan at http://rubyquiz.strd6.com/suggestions Somewhere on a 10x20 grid is a 10 block shape. The shape parts are all adjacent, either horizontally, vertically or diagonally. Write a simple algorithm that will list the co-ordinates of the 10 parts of the shape. Try to minimize lookups to the grid. Here is an example shape to get started (you may need to copy into a monospaced font): 0123456789ABCDEFGHIJ 0.................... 1.................... 2.........@@......... 3........ / ........... 4........@@@@@....... 5............. / ...... 6............ / ....... 7.................... 8.................... 9.................... Have Fun! -- -Daniel http://rubyquiz.strd6.com P.S. Submitting quiz ideas is fun and easy. Visit http://rubyquiz.strd6.com/suggestions to find out more!