Both players need to be in the same local area network.
To play this game, update the variable "IP" in the both client.py and server.py with the private ip adress of the machine, where you will run the server.py script.
The server.py file have to be run in the server machine at first.
Then each of the players should run the clients.py script.(server machine should have only server.py file and each of the clients should have rest of the files)
Enjoy playing TicTacToe.
ps: If you don't know your private ip adress, then google how to find it.
pss: the code might be a little buggy :p
psss: both clients should have pygame installed.