There is one game in the terminal written in Python - tic-tac-toe. It is implemented in such a way that after each command a symbol is displayed - a cross or a toe. The game is made "for two", that is, team 1 is zero, team 2 is a cross and so on, until victory. All the conditions are written down, but you need to screw the network part there, but I don’t understand how to do it at all. Articles from the network only helped to figure out what it is, but I don’t understand how to fasten it to my application or any action at all.
The interaction should be as follows:
- player connects to another player
- player1 enters a command, sending all its files (or their state) to player2 and player1 locks the keyboard to enter commands
- player2 does the same
- after some condition the interaction should be interrupted
socket, and as Alexshev92 said - look towards the Client-Server ... - 0-Level UNIX Monk