From: matthew Date: Wed, 6 Feb 2002 21:56:50 +0000 (+0000) Subject: Correct our logic so we work with non-integer numbers of trouts X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~matthewv/git?p=irc.git;a=commitdiff_plain;h=2982ffcec23c2182bc7a023ec62c2ff4c04a6d35 Correct our logic so we work with non-integer numbers of trouts --- diff --git a/acrobat-chiark-0.2.py b/acrobat-chiark-0.2.py index 6406940..2c6b85c 100755 --- a/acrobat-chiark-0.2.py +++ b/acrobat-chiark-0.2.py @@ -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):