Dec-25-2021, 02:33 AM
I guess I was thinking of something more like this:
class Player : def __init__ (self, hand) self.hand = hand def checkforpair (self) : # look for pair in self.hand return False def checkforstraight (self): # look for straight in self.hand return False def checkforflush (self) : # return True if flush was found in self.hand return False def checkhand (self) : if self.checkforpair () : return 'pair' elif self.checkforstraight () : return 'straight' elif self.checkforflush () : return 'flush'