chiark / gitweb /
Correct our logic so we work with non-integer numbers of trouts
authormatthew <matthew>
Wed, 6 Feb 2002 21:56:50 +0000 (21:56 +0000)
committermatthew <matthew>
Wed, 6 Feb 2002 21:56:50 +0000 (21:56 +0000)
acrobat-chiark-0.2.py

index 640694042f32906a42fe38300d0b328bd90174f4..2c6b85c3cde505ecef0f9fa7b4ca2742c27e9c2b 100755 (executable)
@@ -166,7 +166,7 @@ class Acrobat(SingleServerIRCBot):
             conn.notice(nick, "Sorry, but %s is being a spoilsport." %
                         self.Boring_Git)
             return
-        if self.cur_fish == 0:
+        if self.cur_fish <= 0:
             conn.notice(nick, "Fish stocks exhausted.")
         else:
             self.cur_fish -=1
@@ -222,6 +222,8 @@ class Acrobat(SingleServerIRCBot):
                 if self.cur_fish>self.max_fish:
                     self.cur_fish=self.max_fish
                 self.quotatime=time.time()
+                print self.cur_fish
+                print self.quotatime
 
     # quit irc
     def quit(self, cmd, nick, conn, public):