Skip to content

Instantly share code, notes, and snippets.

View jaymcgavren's full-sized avatar

Jay McGavren jaymcgavren

View GitHub Profile
#All other game states should inherit from this class.
module Jemini
class GameState
@@active_state = nil
def self.active_state
@@active_state
end
def self.active_state=(state)
@@active_state = state
wrong # of arguments(1 for 0)
/Users/jay/Projects/jemini/src/game_state.rb:73:in `create_on_layer'
/Users/jay/Projects/jemini/src/game_state.rb:79:in `create'
/Users/jay/Projects/jemini/examples/life-tank/src/behaviors/shell_shooter.rb:8:in `fire_weapon'
/Users/jay/Projects/jemini/src/behavior.rb:172:in `fire_weapon'
/Users/jay/Projects/jemini/examples/life-tank/src/behaviors/shootable_barrel.rb:107:in `dispatch_fire_weapon'
/Users/jay/Projects/jemini/src/behavior.rb:172:in `dispatch_fire_weapon'
/Users/jay/Projects/jemini/src/behaviors/handles_events.rb:12:in `to_proc'
/Users/jay/Projects/jemini/src/managers/message_queue.rb:30:in `call'
/Users/jay/Projects/jemini/src/managers/message_queue.rb:30:in `process_messages'
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++GameObject not found for loading
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++GameObject not found for loading
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++GameObject not found for loading
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++GameObject not found for loading
50.0
45.0
********************************************************************************
shell: warn: override definnition of Shell#notify.
shell: warn: alias Shell#notify to Shell#notify_org.
#All other game states should inherit from this class.
module Jemini
class GameState
@@active_state = nil
def self.active_state
@@active_state
end
def self.active_state=(state)
@@active_state = state
RubyConf
--------
Just For Fun – Rediscovering Coding as a Hobby (Adam Keys)
BERT and Ernie: Scaling your Ruby site with Erlang (Tom Preston-Werner)
Bits, Bytes, and Blobs (Brian Mitchell)
Code of Art (Jeff Casimir)
Computer vision using Ruby and libJIT (Jan Wedekind)
DSLs, Code Generation, and New Domains for Ruby (Joel VanderWerf)
East Meets West (Yuki Sonoda)
Embracing Collaboration with JRuby and JavaScript (Jon Crosby)
jay@dandelion:~/Projects
$ twtr ft | head -n 3 | cowsay
______________________________________
/ BM5k: @squanderingtime indeed =D \
| squanderingtime: @BM5k I had to look |
| that up. That's ridiculous. BM5k: $ |
\ sudo port install cowsay /
--------------------------------------
\ ^__^
\ (oo)\_______
ruby -rtk -e"v,w=0,0;a=[1]*9;c=TkCanvas.new;c.pack.bind('Motion',proc{|x,y|a<<TkcLine.new(c,v,w,v=x,w=y,:arrow=>'last');a.shift.delete rescue 1},'%x %y').mainloop"
ruby -rtk -e"def Object.const_missing(n);Module.const_get Module.constants.find{|c|c=~/^#{n}/};end;c=TkCan.new.pack;a=[c,0,0,99,99];[TkcA,TkcL,TkcO,TkcR].each{|t|t.new *a};c.mainloop"
60.times{|a|p (0..240).map{|b|x=y=i=0;(x,y,i=x*x-y*y+b/150-1.5,2*x*y+a/40.0-1,i+1)until(x*x+y*y>4||i>98);99<=>i}*''}
"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
#!/usr/bin/env ruby
require 'rubyonacid/factories/example'
require 'rubyonacid/factories/all'
require 'tk'
#This factory will be in charge of all drawing coordinates, colors, etc.
f = RubyOnAcid::RoundingFactory.new
f.source_factories << RubyOnAcid::LissajousFactory.new
proximity_factory = RubyOnAcid::ProximityFactory.new(