My problem is: If you run this code in the above link,
type(c1)(check line 67) is string rather than a a reference to the Card class (console guidline in line102)
My question is: I don't see a path of logic/don't know python well enough to make type(c1) reference Card without changing Deck format (the way its printing at the moment is how it needs to stay)
My thinking is as follows.
line 66 turns test_deck into a deck of cards in the form of a string "CA C2 C3..." - I need to change this somehow without changing this print (why? how?)
line 67 - I grab the first part of the deck alright. but instead of it being a reference to the Card Function,its a plain ole string.
...so: I need to change Deck from being a list of strings to a list of references to Card class.
problem is, I have no idea if this is correct, and if it is, how to go about it.
And I look forward to being part of this community.

New Topic/Question
Reply


MultiQuote


|