Learning exercise for a simple card game