hybridgroup / kidsruby

KidsRuby is a Ruby programming environment meant for kids to learn and have fun!
http://kidsruby.com
Other
333 stars 104 forks source link

Error in Help for Make Games with Gosu, lesson 1 #50

Closed TheGrogor closed 12 years ago

TheGrogor commented 12 years ago

Help file says:

Now, we're almost ready to try this again. I need to go to the MyGame class first, and I need to instantiate this player.

I do this by typing in the initialize method:

@player1 = Player.new(game_window) This tells the player which window to draw itself on.

this results in an error:

/var/folders/yv/yvh4VEXl2RWUgE+3+X2F+U+++TM/-Tmp-/kidcode.rb:9:in initialize': undefined local variable or methodgame_window' for # (NameError)

Possible solution: replace @player1 = Player.new(game_window) with @player1 = Player.new(self)

deadprogram commented 12 years ago

Fix by this commit: https://github.com/hybridgroup/kidsruby/commit/2b58b95e286a88eef37835bc2c1d540ed82e5775