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 :)
-
Access the Game: Visit the Tic-Tac-Toe-P2P to access the game online.
-
Start a Game:
- Click the "Start Game" button to generate your unique connection ID.
- Share this ID with your friend.
-
Join a Game:
- Enter the connection ID provided by your friend in the input field.
- Click the "Join Game" button to connect.
-
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.
-
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.
-
Open the Extension:
- Click on the Tic Tac Toe P2P icon in the Chrome toolbar to open the popup.
-
Start or Join a Game:
- Follow the same steps as in the online mode to start or join a game.