Ver código fonte

doofy doof does thingy with wrong types duh

Phil 2 anos atrás
pai
commit
08840e4e1b
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      lib/tron.rb

+ 2 - 2
lib/tron.rb

@@ -47,8 +47,8 @@ def parse(message)
     end
   when "tick"
     puts "#{Time.now.strftime('%M%S%L')}: #{message}"
-    puts "tick took: #{Time.now.strftime('%M%S%L') - $lasttick}"
-    $lasttick = Time.now.strftime('%M%S%L')
+    puts "tick took: #{Time.now.strftime('%M%S%L').to_i - $lasttick}"
+    $lasttick = Time.now.strftime('%M%S%L').to_i
     decide()
   when "die"
     puts "#{Time.now.strftime('%M%S%L')}: #{message}"