https://github.com/abdussattar-70/cryptorps
CriptoRPS - a Rock, Paper, Scissors game with a cryptographic twist! This command-line game is built using JavaScript and incorporates HMAC
https://github.com/abdussattar-70/cryptorps
chalk command-line cripto javascript nodejs sha3-256
Last synced: 11 months ago
JSON representation
CriptoRPS - a Rock, Paper, Scissors game with a cryptographic twist! This command-line game is built using JavaScript and incorporates HMAC
- Host: GitHub
- URL: https://github.com/abdussattar-70/cryptorps
- Owner: AbdusSattar-70
- License: mit
- Created: 2023-12-05T12:35:30.000Z (about 2 years ago)
- Default Branch: dev
- Last Pushed: 2024-10-10T14:57:40.000Z (over 1 year ago)
- Last Synced: 2025-02-03T12:28:03.248Z (about 1 year ago)
- Topics: chalk, command-line, cripto, javascript, nodejs, sha3-256
- Language: JavaScript
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CriptoRPS
# 📗 Table of Contents
- [📖 About the Project](#about-project)
- [🚀 Introduction](#introduction)
- [🎮 Game Overview](#game-overview)
- [🔑 HMAC Generation](#hmac-generation)
- [💻 Getting Started](#getting-started)
- [🛠 Prerequisites](#prerequisites)
- [🚀 Installation](#installation)
- [🎮 Gameplay](#gameplay)
- [🔄 How to Play](#how-to-play)
- [📊 Game Logic](#game-logic)
- [👤 Author](#author)
- [📝 License](#license)
Welcome to CriptoRPS - a Rock, Paper, Scissors game with a cryptographic twist! This command-line game is built using JavaScript and incorporates HMAC (Hash-based Message Authentication Code) for enhanced security and transparency.
BUILT WITH
- console app
- Node.js
- JavaScript.js
Run environment
- console app
- Node.js
Database
- no Database
CriptoRPS allows players to engage in a classic Rock, Paper, Scissors game while ensuring the integrity of the moves through HMAC. The game generates a unique HMAC key for each session, adding an extra layer of security and transparency.
The game utilizes cryptographic functions to generate HMAC keys and hash moves, ensuring that the game's outcome is secure and verifiable.
To run CriptoRPS, you need the following:
- Node.js installed on your machine
1. Clone the repository:
```bash
git clone https://github.com/AbdusSattar-70/criptoRPS.git
cd criptoRPS
```
2. Install dependencies:
```bash
npm install
```
1. Run the game:
```bash
node main.js MOVE1 MOVE2 MOVE3
```
## Example Valid Moves:
- node main.js MOVE1 MOVE2 MOVE3
- node main.js STONE PAPER SCISSORS
- node main.js STONE SPOCK PAPER LIZARD SCISSORS
- node main.js Rock Paper STONE LIZARD SPOCK
- node main.js A B C D E F G
- node main.js 1 2 3 4 5 6 7 8 9
## Examples of Invalid moves:
- node main.js
- node main.js Rock
- node main.js A A A
- node main.js Rock Paper Paper
- node main.js Rock Paper Scissors Lizard Scissors
- node main.js 1 2 3 4 5 6 7 8
2. Follow the on-screen instructions to make your move.
3. Enjoy the game and verify its transparency using HMAC!
The game follows a standard Rock, Paper, Scissors logic with an added layer of cryptographic security. The HMAC key ensures that the moves are tamper-proof and verifiable.
## HELP TABLE
Results are from the user's point of view:
which move would result in what? You Win / Lose / Draw
| v PC\User > | ROCK | STONE | LIZARD | SPOCK | PAPER | 6TH | 7TH |
| ----------- | ---- | ----- | ------ | ----- | ----- | ---- | ---- |
| ROCK | Draw | Win | Win | Win | Lose | Lose | Lose |
| STONE | Lose | Draw | Win | Win | Win | Lose | Lose |
| LIZARD | Lose | Lose | Draw | Win | Win | Win | Lose |
| SPOCK | Lose | Lose | Lose | Draw | Win | Win | Win |
| PAPER | Win | Lose | Lose | Lose | Draw | Win | Win |
| 6TH | Win | Win | Lose | Lose | Lose | Draw | Win |
| 7TH | Win | Win | Win | Lose | Lose | Lose | Draw |
## 👤 Abdus Sattar
- GitHub: [AbdusSattar-70](https://github.com/AbdusSattar-70)
- Twitter: [Abdus Sattar](https://twitter.com/Abdus_Sattar70)
- LinkedIn: [Abdus Sattar](https://www.linkedin.com/in/abdus-sattar-a41a26215/)
## Future Features
- UI LOOK
- INTERACTIVE GAME
## Contributing
Everybody is welcome to suggest changes, contribute, report issues, and request features in this project. To do so, fork this repository, create a new branch, and open a pull request from your branch.
Feel free to check the [issues page](../../issues/).
## Show Your Support
If you like this project, please give it a star ⭐️. You can use it following the [MIT License](./LICENSE).
## Acknowledgments
I would like to thank [Itransition-Group](https://www.itransition.com/) for the opportunity to learn and use their platform and services for free.
## License
This project is under the [MIT License](./LICENSE).