Dec-27-2021, 02:52 AM
(This post was last modified: Dec-27-2021, 02:53 AM by CompleteNewb.)
So it would be impossible to change self.hand in a function inside the class without a setter?
class Player: flop = [] turn = [] river = ['This is Player.river'] def __init__(self, number, chips): self.number = number self.chips = chips self.hand = [] def pickplayershandwithclassvariable(self, deck): card = pickacard(deck) variable.append(card) #Change self.hand here by adding card to the self.hand list return self.hand