Matt's Class Hack

by Matt Zimo

13 Jun 2017

Don’t look:

I simply don’t understand why I can’t get this to work. I tried to make the deck from my blackjack game a class with all of the functions attached, but it doesn’t work. I’m trying to use the list pop method in the deal_card method definition (see tab deck1.py), but it doesn’t let me. Do I need to define lists within this operator? When I fixed that issue, I now get stuck with it saying that “deal_cards” is not defined. My brain is turning to mush and I still have to do work on my final project, so I am just going to take a loss on this one.

Matt Zimo is an information science grad student at UNC Chapel Hill. Go Vols! Find Matt Zimo on Twitter, Github, and on the web.