它一直说语法错误意外'n'期待:: ['或'。' 和语法错误意外关键字_确保预期输入结束。我的代码有什么问题?
require 'rubygems'
require 'rubygame'
class
def initialize
@screen = Rubygame::Screen.new [640, 480], 0, [Rubygame::HWSURFACE, Rubygame::DOUBLEBUF]
@screen.title = "Pong"
@queue = Rubygame::EventQueue.new
@clock = Rubygame::Clock.new
@clock.target_framerate = 60
end
def run!
loop do
update
draw
@clock.tick
end
end
def update
end
def draw
end
end
g = Game.new
g.run!