Backend containing general card game logic