Refactored card playing to use a stack