소스 검색

doofy doof does thingy with wrong types duh

Phil 2 년 전
부모
커밋
08840e4e1b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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}"