def passCardsAuto(): return Automate.passCard(self)
def playCardAuto(self, sofar): auto = Automate() return auto.playCard(self, sofar)
def passCardsAuto(): auto = Automate(); return auto.passCard(self)
def playCardAuto(self, sofar): auto = Automate(); return auto.playCard(self, sofar);
def passCardsAuto(): auto = Automate() return auto.passCard(self)
for i in range(13): #check on the first hand only if (i == 0): for k in range(4): if Players[k].hasTwoOfClubs: turn = k break #check what has been played so far sofar = [] point_total = 0 #each person plays a card (and loops through turn) for m in range(4): print str(turn) + " " + str(Players[turn].hand) card = Players[turn].playCardAuto(sofar) sofar.append(card) turn = (turn + 1) % 4 point_total += CardClass.pointValue(card) turn = CardClass.winner(sofar) #indicate who wins the trick Players[turn].points += point_total print sofar auto = Automate() player = GamePlayMethods.Player() hand = [1, 6, 10, 14, 29, 32, 39, 41, 42, 43, 45, 46, 47] sofar = [0, 2, 11] player.setHand(hand) print auto.playCard(player, sofar)