Methods
Public Instance methods
contract method - generate the challenge
[ show source ]
# File lib/turing/image_plugins/spiral.rb, line 17 17: def generate(img, word) # {{{ 18: fg = GD2::Color[185, 140, 140] 19: sfg = GD2::Color[225, 190, 190] 20: 21: spiral(img, (img.width/3) + rand(img.width/3), rand(img.height), sfg) 22: 23: write_string(img, 'cour.ttf', fg, word) 24: 25: spiral(img, rand(img.width / 3), rand(img.height), sfg) 26: spiral(img, 2*(img.width/3) + rand(img.width/3), rand(img.height), sfg) 27: end