Skip to content

ravipanchani-tomtom/tic-tac-toe-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe P2P Game

This project is a peer-to-peer Tic Tac Toe game that can be played both as a Chrome extension and as a standalone web page hosted on GitHub Pages. The game uses PeerJS for peer-to-peer communication, allowing two players to connect and play in real-time. Built using gpt-4o and prompt engineering :)

How to Play

Online Mode

  1. Access the Game: Visit the Tic-Tac-Toe-P2P to access the game online.

  2. Start a Game:

    • Click the "Start Game" button to generate your unique connection ID.
    • Share this ID with your friend.
  3. Join a Game:

    • Enter the connection ID provided by your friend in the input field.
    • Click the "Join Game" button to connect.
  4. Play:

    • Take turns clicking on the board to place your mark (X or O).
    • The game will automatically update the board and display the winner or if it's a draw.

Chrome Extension Mode

  1. Install the Extension:

    • Clone / Download this repository to your local machine.
    • Open Chrome and navigate to chrome://extensions/.
    • Enable "Developer mode" using the toggle in the top right corner.
    • Click "Load unpacked" and select the directory containing the extension files.
  2. Open the Extension:

    • Click on the Tic Tac Toe P2P icon in the Chrome toolbar to open the popup.
  3. Start or Join a Game:

    • Follow the same steps as in the online mode to start or join a game.