From: <umg...@us...> - 2007-03-29 19:26:45
|
Revision: 371 http://svn.sourceforge.net/pybridge/?rev=371&view=rev Author: umgangee Date: 2007-03-29 12:26:41 -0700 (Thu, 29 Mar 2007) Log Message: ----------- Fix a bug which allowed Redouble on top of another Redouble. Modified Paths: -------------- trunk/pybridge/pybridge/bridge/bidding.py Modified: trunk/pybridge/pybridge/bridge/bidding.py =================================================================== --- trunk/pybridge/pybridge/bridge/bidding.py 2007-03-27 15:39:04 UTC (rev 370) +++ trunk/pybridge/pybridge/bridge/bidding.py 2007-03-29 19:26:41 UTC (rev 371) @@ -152,14 +152,15 @@ if isinstance(call, Double): opposition = (Player[(self.whoseTurn().index + 1) % 4], Player[(self.whoseTurn().index + 3) % 4]) - return not self.getCurrentCall(Double) and bidder in opposition + return bidder in opposition and not self.getCurrentCall(Double) # A redouble must be made on the current bid from partnership, # which has been doubled by an opponent. elif isinstance(call, Redouble): partnership = (self.whoseTurn(), Player[(self.whoseTurn().index + 2) % 4]) - return self.getCurrentCall(Double) and bidder in partnership + return bidder in partnership and self.getCurrentCall(Double) \ + and not self.getCurrentCall(Redouble) return False # Otherwise unavailable. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |