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 6406940..2c6b85c 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):