Need Help with Card Game Multiplayer(Unet)?

Hello, I am making a multiplayer card game which is a turn based game with multiplayer. I am confused with the approach. Should I shuffle cards and initialize deck at the server? Can someone guide me a bit? I am currently thinking of making a deck at server only which will initialize and shuffle the deck. What should be my approach? Kindly help a bit.

Good day.

As all multiplayer Server-Client games there are some things that must be done to prevent cheats, to prevent sync breaks, etc… The Correct, or best way to do in your gamne should be:

The server thinks everything, The client only “says” to the server what he wants to do, what card ants top play, what buton he press and its the server who execute the “damage method”, shuffle the deck, draw a card, destroy obvjects, etc… and the server comunicates what he “think” to the clients, and clients only paint what server said is happening. But then, everything that does not need to be “think” like rendering the sprites, visual effects, must be executed in the client.

So lets make a siple situation:

Server select 4 random cards to draw, and inform the client what cards have been picked.

The client then executes a animation drawing 4 cards and rendering that cards images/text.

Thent he client select one card to play itm, and informs the server that wants to play that card.

The server recieve this order, and see that kind of card needs an opbjective to be played, so informs the clients that a target must be selected.

The client render the “select objective sprite/cursor” and selects an objective. Of course, client informs the server what objective he selected.

Then the server recieve this information, decide if its a possible objective for that card (imagine yes, it is) so informs the client that needs to play the animation “fireball” to that objective, informs also how much damage is done, etc…

The client then renders the animation of fireball, renders a text showing how much damage has been done, etc…

As you see, the client do not think, do not check, or compare elements, just follow the server orders (Paint this, render that, activate this…) And is the server who does all the job.

This is the way you need to do everything, to prevent 2 clients to think the same problem and give different results…