]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/games/roulette.rb
markov: refactor triplet learning
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / games / roulette.rb
index 7c25a6cc39389fe36071b45e65e93022b1f879c0..6d8347888cf52c94b2bba658697a5b21eb9d6b7e 100644 (file)
@@ -1,14 +1,14 @@
 define_structure :RouletteHistory, :games, :shots, :deaths, :misses, :wins
 
 class RoulettePlugin < Plugin
-  BotConfig.register BotConfigBooleanValue.new('roulette.autospin',
-    :default => true, 
+  Config.register Config::BooleanValue.new('roulette.autospin',
+    :default => true,
     :desc => "Automatically spins the roulette at the butlast shot")
-  BotConfig.register BotConfigBooleanValue.new('roulette.kick',
-    :default => false, 
+  Config.register Config::BooleanValue.new('roulette.kick',
+    :default => false,
     :desc => "Kicks shot players from the channel")
-  BotConfig.register BotConfigBooleanValue.new('roulette.twice_in_a_row',
-    :default => false, 
+  Config.register Config::BooleanValue.new('roulette.twice_in_a_row',
+    :default => false,
     :desc => "Allow players to go twice in a row")
 
   def initialize
@@ -174,7 +174,7 @@ class RoulettePlugin < Plugin
       k = match[1]
 
       total_players += 1
-      
+
       win_rate = v.wins.to_f / v.games * 100
       if h_win_percent[0].nil? || win_rate > h_win_percent[1] && v.games > 2
         h_win_percent = [[k], win_rate]