Exemple #1
0
 def __repr__(self):
     options = ''
     if self.opening:
         options += ', opening=True'
     if self.takeout_double:
         options += ', takeout_double=True'
     if self.negative_double:
         options += ', negative_double=True'
     if self.lead_directing_double:
         options += ', lead_directing_double=True'
     if self.penalty_double:
         options += ', penalty_double=True'
     if self.blackwood:
         options += ', blackwood=True'
     if self.gerber:
         options += ', gerber=True'
     if self.stayman:
         options += ', stayman=True'
     if self.two_spades_puppet:
         options += ', two_spades_puppet=True'
     if self.transfer_to:
         options += ', transfer_to=%s' % suit_char(self.transfer_to)
     if self.jacoby_transfer:
         options += ', jacoby_transfer=True'
     if self.fourth_suit_forcing:
         options += ', fourth_suit_forcing=True'
     if self.two_nt_feature_request:
         options += ', two_nt_feature_request=True'
     if self.jordan:
         options += ', jordan=True'
     if self.preempt:
         options += ', preempt=True'
     return "SemanticBid('%s'%s)" % (self.name, options)
Exemple #2
0
 def pretty_one_line(self, include_bid_name=True):
     flag_strings = []
     if include_bid_name:
         flag_strings.append(self.name)
     if self.opening:
         flag_strings.append('opening')
     if self.takeout_double:
         flag_strings.append('takeout')
     if self.negative_double:
         flag_strings.append('negative')
     if self.lead_directing_double:
         flag_strings.append('lead_directing')
     if self.penalty_double:
         flag_strings.append('penalty')
     if self.blackwood:
         flag_strings.append('blackwood')
     if self.gerber:
         flag_strings.append('gerber')
     if self.michaels_cuebid:
         flag_strings.append('michaels')
     if self.michaels_minor_request:
         flag_strings.append('minor_request')
     if self.stayman:
         flag_strings.append('stayman')
     if self.two_spades_puppet:
         flag_strings.append('two_spades_puppet')
     if self.transfer_to:
         flag_strings.append('transfer_to=%s' % suit_char(self.transfer_to))
     if self.jacoby_transfer:
         flag_strings.append('jacoby_transfer')
     if self.fourth_suit_forcing:
         flag_strings.append('fsf')
     if self.two_nt_feature_request:
         flag_strings.append('feature_request')
     if self.jordan:
         flag_strings.append('jordan')
     if self.preempt:
         flag_strings.append('preempt')
     return " ".join(flag_strings)