Skip to content

Instantly share code, notes, and snippets.

@notblizzard

notblizzard/a.rb Secret

Created June 9, 2015 18:50
Show Gist options
  • Save notblizzard/dfc9012f1ef5d04dd65b to your computer and use it in GitHub Desktop.
Save notblizzard/dfc9012f1ef5d04dd65b to your computer and use it in GitHub Desktop.
class ShowdownBot
attr_accessor :team, :tier, :ladder, :p1_pkmn, :p2_pkmn, :p1_name, :p2_name
@ws = nil
@moves = Hash.new { |h,k| h[k] = Array.new }
....
when 'request'
team = JSON.parse(m[2])
moves = ['keldeo', 'gengar']
moves.each do |move|
@moves[:moves] << {:name => move}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment