card game problem