Esempio n. 1
0
def createPlayers():
    #initialize players, deal starting hand
    p1 = Player("Player 1")
    p2 = Player("Player 2")
    p3 = Player("Player 3")
    p4 = Player("Player 4")

    for i in range(0, 5):
        p1.hand.append(deck.pop())
        p2.hand.append(deck.pop())
        p3.hand.append(deck.pop())
        p4.hand.append(deck.pop())

    return p1, p2, p3, p4
Esempio n. 2
0
def goFish(p):
    global players
    #adds top card of deck to player's hand, if any cards are in the deck
    if deck:
        p.hand.append(deck.pop(0))
Esempio n. 3
0
 def draw(self, deck: list):
     self.hand.append(deck.pop())