OK. Great that worked now my_game.rb file now reads
$: << File.expand_path(File.dirname(__FILE__))
require 'rubygems'
require 'gosu'
require 'player'
class MyGame < Gosu::Window
def initialize
super(300, 400, false)
@player = Player.new(self)
end
def update
if button_down? Gosu::Button::KbLeft
@player1.move_left
end
end
def draw
@player.draw
end
end
when I go to execute in cmd prmpt the ruby screen is presented with my
image and when I press the left button the screen disappears and this
error is presented.
my_game.rb:14:in 'update': undefined method 'move_left' for
nil:NilClass <NoMethodError>
from my_game.rb:25:in 'show'
from my_game.rb:25:in '<main>'