CodePudding user response:
Realize single machine, and then realize the simplest C/S, finally realize peopleWhere are you now got to?
CodePudding user response:
@ Runnerchin, thank you for your attention and answer.Now I've put the single machine is ready, then how should achieve C/S? Start from? Ask you again!
CodePudding user response:
The specific code is certainly notGive you a idea
C/s is on behalf of the server s
That is to say, need to have server
So you need to write another server to send and receive client data
Sending and receiving part can use UDP or TCP to make relevant code can find online
The server content in this game you
It is this poker
First, you need to log in to server
Then you can start the game client endpoint button, initialize a poker data from the server, and then sent to the client
The client then according to the data server from poker to display content
A synchronous increase double and multiplayer games start
On the server to get access to the client, and then according to the different game bureau to send game data and start the order, when a client to finish the game, the client sends commands to the server, the end of the game and then according to the completed successively to determine the outcome of the game.
Server if you don't do, also can use our Windows hearts model, made from a client to the server, the other clients to connect to the client to start the game, the data model is similar to the above,
Of course this is a very superficial description, there are many contents need to be considered. While waiting for the specific problem to ask again.
CodePudding user response:
This aspect of the open source code should be able to search,