Skip to content

Commit

Permalink
Return, as well as the start button, can now begin the game.
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerc committed Apr 16, 2010
1 parent 7796d3a commit fc87850
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion game.rb
Expand Up @@ -321,9 +321,12 @@ def initialize name, rgb
@text.color = [255,255,255]
end

mouse_pressed_on do
start_game = Proc.new do
@@game.switch_state InGame.new @name.text, @rgb.color
end

mouse_pressed_on { start_game.call }
key_press(:return) { start_game.call }
end
end

Expand Down

0 comments on commit fc87850

Please sign in to comment.