Cards state machine