Update libcard.cpp