Added numCards attribute, and isEmpty function