Skip to content

Ayush979/Tic-Tac-Toe-Using-SocketProgramming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

  • Tic Tac Toe game with socket programming and pygame.
  • Players can compete against each other over a network by connecting to the server.

Installing Packages

  • Install the following package dependencies using pip:
pip install pygame

How to Play?

  • Move to the Directory 04 TicTacToe - Socket + Pygame
cd "Tic-Tac-Toe\04 TicTacToe - Socket + Pygame"
  • Start the Server
python server.py
  • Start two players and enter the IP address. If both the players are on same host, use the loopback IP 127.0.0.1 or localhost.

    • Player 1
    python player.py
    pygame 1.9.6
    Hello from the pygame community. https://www.pygame.org/contribute.html
    Enter the server IP:localhost
    Connected to : localhost : 9999
    
    • Player 2
    python player.py
    pygame 1.9.6
    Hello from the pygame community. https://www.pygame.org/contribute.html
    Enter the server IP:127.0.0.1
    Connected to : 127.0.0.1 : 9999
    
  • Now you can start playing Tic Tac Toe over a network.


Screenshots

Player 1 Player 2

Player 1 Wins

Player 1 Wins

Player 2 Wins

Player 2 Wins

Draw Game

Draw Game


Note

Feel free to play the other versions of Tic Tac Toe in this repo (on Terminal, on Terminal with Socket).


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages