basic logic to handle card playing