Skip to content

Commit

Permalink
Correct a few errors and format problems in code samples
Browse files Browse the repository at this point in the history
  • Loading branch information
deadprogram committed Feb 24, 2012
1 parent 62baa3d commit 34d57ea
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions public/help/shared/ruby4kids/code3_1.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
if button_down? Gosu::Button:: KbLeft if button_down? Gosu::Button:: KbLeft
@player1.move_left @player1.move_left

end
1 change: 0 additions & 1 deletion public/help/shared/ruby4kids/code3_2.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,2 @@
@game_window = game_window @game_window = game_window
@icon = Gosu::Image.new(@game_window, "images/player1.png", true) @icon = Gosu::Image.new(@game_window, "images/player1.png", true)

1 change: 0 additions & 1 deletion public/help/shared/ruby4kids/code3_3.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,2 @@
@x = 50 @x = 50
@y = 50 @y = 50

4 changes: 2 additions & 2 deletions public/help/shared/ruby4kids/code3_4.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
def draw def draw
@icon.draw(@x,@y,1) @icon.draw(@x, @y, 1)

end
2 changes: 1 addition & 1 deletion public/help/shared/ruby4kids/code3_5.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
def move_left def move_left
@x = @x - 10 @x = @x - 10

end
2 changes: 1 addition & 1 deletion public/help/shared/ruby4kids/code3_6.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
def move_left def move_left
@x = @x - 10 @x = @x - 10

end
2 changes: 1 addition & 1 deletion public/help/shared/ruby4kids/code3_7.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'gosu' require 'gosu'
require 'player'


class MyGame < Gosu::Window class MyGame < Gosu::Window
def initialize def initialize
Expand All @@ -10,6 +9,7 @@ def initialize
def update def update
if button_down? Gosu::Button::KbLeft if button_down? Gosu::Button::KbLeft
@player1.move_left @player1.move_left
end
end end


def draw def draw
Expand Down

0 comments on commit 34d57ea

Please sign in to comment.