(mostly) chance/card code reorganization