This is a simple implementation of the classic rock-paper-scissors game for two players using WebSockets. Players can connect to the server and play against each other in real-time.
- Real-time gameplay using WebSockets.
- Simple and intuitive user interface.
- Support for two players to play against each other remotely.
- Basic error handling and validation.
- HTML/CSS/JavaScript: Frontend user interface.
- Node.js: Backend server.
- WebSocket API: For real-time communication between clients and server.
To run this game locally, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory in your terminal.
- Install dependencies by running
npm install
. - Start the server by running
node server.js
. - Open your web browser and navigate to
http://localhost:3000
. - Share the link with another player to start playing!
- Open the game URL in your browser.
- Share the URL with another player.
- Once both players are connected, they can start playing by choosing rock, paper, or scissors.
- The game will determine the winner based on the choices made by both players.
- Enjoy the game and have fun!
To run this game locally follow these steps :
1 ) Clone this repository
git clone https://github.com/Thiru-kumaran-R/Rock-Paper-Scissor.git
2 ) Navigate to the project directory:
cd rock-paper-scissors
3 )Install dependencies:
npm install
4 ) Start the server:
npm start
5 ) Open your browser and visit http://localhost:3000 to play the game.
Contributions are welcome! If you find any bugs or want to suggest improvements, feel free to open an issue or submit a pull request.
- This project was inspired by the classic rock-paper-scissors game.