fork download
  1. require 'dxruby'
  2.  
  3. class MySprite < Sprite
  4. @@image = Image.new(100, 100, C_WHITE)
  5.  
  6. def initialize
  7. super
  8. self.x = 0
  9. self.y = 100
  10. self.image = @@image
  11. end
  12.  
  13. def update
  14. self.x += 1
  15. end
  16. end
  17.  
  18. s = MySprite.new
  19.  
  20. Window.loop do
  21. s.update
  22. s.draw
  23. end
  24.  
Runtime error #stdin #stdout #stderr 0.05s 9872KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- dxruby (LoadError)
	from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from prog.rb:1:in `<main>'