def __init__(self, which):
     self.players = ['stupid', 'smart']
     self.player_name = which
     if not (which in self.players):
         print "player %s not found" % which
         exit(1)
     self.hand_rules = HandRules()
 def __init__(self, which):
     self.players = ['stupid', 'smart']
     self.player_name = which
     if not (which in self.players):
         print "player %s not found" % which
         exit(1)
     self.hand_rules = HandRules()
class Player(object):

    def __init__(self, which):
        self.players = ['stupid', 'smart']
        self.player_name = which
        if not (which in self.players):
            print "player %s not found" % which
            exit(1)
        self.hand_rules = HandRules()

    def this_hand(self, last_hand):

        if self.player_name == self.players[0]:
            list = [self.hand_rules.hand_win(last_hand), self.hand_rules.hand_win(last_hand), last_hand]
        else:
            list = [self.hand_rules.hand_lose(last_hand), self.hand_rules.hand_lose(last_hand), self.hand_rules.hand_win(last_hand), last_hand]
        return choice(list)
class Player(object):
    def __init__(self, which):
        self.players = ['stupid', 'smart']
        self.player_name = which
        if not (which in self.players):
            print "player %s not found" % which
            exit(1)
        self.hand_rules = HandRules()

    def this_hand(self, last_hand):

        if self.player_name == self.players[0]:
            list = [
                self.hand_rules.hand_win(last_hand),
                self.hand_rules.hand_win(last_hand), last_hand
            ]
        else:
            list = [
                self.hand_rules.hand_lose(last_hand),
                self.hand_rules.hand_lose(last_hand),
                self.hand_rules.hand_win(last_hand), last_hand
            ]
        return choice(list)