from card import *
from CardCollection import *
def main():
Player1 = input("Player 1, what is your name?: ") # Gets the first players name
print("Ok, thanks " + Player1) # Shows them that I got their name
Player2 = input("Player 2, what is your name?: ")
print("Got it, good luck " + Player2)
playingDeck = CardDeck() # Generates a deck of 52 cards
playingDeck.shuffle() # Uses the shuffle method to put the cards in a random order
Player1hand = playingDeck.deal(15) # Deals out to Player1
Player2hand = playingDeck.deal(15) # Deals out to Player2
This will not work, but when I change it to this it works fine...
from card import *
from CardCollection import *
playingDeck = CardDeck() # Generates a deck of 52 cards
playingDeck.shuffle() # Uses the shuffle method to put the cards in a random order
Player1hand = playingDeck.deal(15) # Deals out to Player1
Player2hand = playingDeck.deal(15) # Deals out to Player2
def main():
Player1 = input("Player 1, what is your name?: ") # Gets the first players name
print("Ok, thanks " + Player1) # Shows them that I got their name
Player2 = input("Player 2, what is your name?: ")
print("Got it, good luck " + Player2)

New Topic/Question
Reply



MultiQuote




|