예제 #1
0
파일: robots.py 프로젝트: subsetpark/pyquet
class Robot(Server):

    def __init__(self):
        player1 = Rabelais('Barry Lyndon')
        player2 = Viewer('Rabelais')
        self.players = {player1, player2}
        self.partie = Partie(player1, player2)

    def report(self, d):
        self.announce("{}:\n{}".format(d.elder, d.elder.print_hand()))
        self.announce("{}:\n{}".format(d.younger, d.younger.print_hand()))

    def play_a_hand(self):
        d = self.partie.new_deal()
        # The deal
        self.announce('---')
        d.deal()
        self.report(d)
        self.exchange(d)
        self.report(d)
        self.declarations(d)
        self.tricks(d)
        self.announce('\nDeal: {}'.format(d.score))
        input("...")
        return d.score
예제 #2
0
class Robot(Server):
    def __init__(self):
        player1 = Rabelais('Barry Lyndon')
        player2 = Viewer('Rabelais')
        self.players = {player1, player2}
        self.partie = Partie(player1, player2)

    def report(self, d):
        self.announce("{}:\n{}".format(d.elder, d.elder.print_hand()))
        self.announce("{}:\n{}".format(d.younger, d.younger.print_hand()))

    def play_a_hand(self):
        d = self.partie.new_deal()
        # The deal
        self.announce('---')
        d.deal()
        self.report(d)
        self.exchange(d)
        self.report(d)
        self.declarations(d)
        self.tricks(d)
        self.announce('\nDeal: {}'.format(d.score))
        input("...")
        return d.score
예제 #3
0
파일: robots.py 프로젝트: subsetpark/pyquet
 def __init__(self):
     player1 = Rabelais('Barry Lyndon')
     player2 = Viewer('Rabelais')
     self.players = {player1, player2}
     self.partie = Partie(player1, player2)
예제 #4
0
 def __init__(self):
     player1 = Rabelais('Barry Lyndon')
     player2 = Viewer('Rabelais')
     self.players = {player1, player2}
     self.partie = Partie(player1, player2)