diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-28 01:30:48 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-28 01:30:48 -0400 |
commit | 85c74dac1f82dc1869a2875a9354be0b4b3361ac (patch) | |
tree | 4154815d3e5896ee6d68712f08a4dcac2b84872b /lib/sampling/manual.rb | |
parent | b0b2a235f02b95058aa7bfbf817d5dd1d85b6730 (diff) | |
parent | 9a8d183f6896a92b84a15599323b32e73b5868b9 (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'lib/sampling/manual.rb')
-rw-r--r-- | lib/sampling/manual.rb | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/sampling/manual.rb b/lib/sampling/manual.rb index b5c97c4..a190bd2 100644 --- a/lib/sampling/manual.rb +++ b/lib/sampling/manual.rb @@ -1,10 +1,10 @@ module Sampling - module Manual + class Manual def self.works_with?(game) return true end - def can_get?(user, setting_name) + def can_get?(setting_name) return 1 end @@ -20,12 +20,20 @@ module Sampling raise "This sampling method doesn't use remote usernames." end - def self.sampling_start(match, statistics) + #### + + def initialize(match) + @match = match + end + + def start # do nothing end - def self.render_user_interaction(match, user) - # TODO + def render_user_interaction(user) + @current_user = user + @users = @match.users + @stats = @match.stats_from(self.class) require 'erb' erb_filename = File.join(__FILE__.sub(/\.rb$/, '.svg.erb')) @@ -34,9 +42,8 @@ module Sampling return erb.result.html_safe end - def self.handle_user_interaction(match, user, sampling_params) + def handle_user_interaction(user, sampling_params) # TODO - #match.statistics.create(user: nil, name: "blowout", end end end |