Class: Shoes::Redblue

Inherits:
Widget
  • Object
show all
Defined in:
lib/interface_widgets.rb

Instance Method Summary collapse

Constructor Details

#initialize(race) ⇒ Redblue


73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/interface_widgets.rb', line 73

def initialize(race)
  image(20, 20, {:top => 8, :left => 150}) do
    fill red
    rect(:top => 0, :left => 0, :height => 15, :width => 7)
    fill blue
    rect(:top => 0, :left => 7, :height => 15, :width => 7)
    click do
      race.flip
      @matches.clear { list_matches }
    end
  end 
end