Added solution for CardGame homework2.