Skip to content

CriptoRPS - a Rock, Paper, Scissors game with a cryptographic twist! This command-line game is built using JavaScript and incorporates HMAC

License

Notifications You must be signed in to change notification settings

AbdusSattar-70/CryptoRPS

Repository files navigation

CriptoRPS

📗 Table of Contents

📖 About the Project

🚀 Introduction

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

Tech Stack

BUILT WITH
Run environment
Database
  • no Database

🎮 Game Overview

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.

🔑 HMAC Generation

The game utilizes cryptographic functions to generate HMAC keys and hash moves, ensuring that the game's outcome is secure and verifiable.

💻 Getting Started

🛠 Prerequisites

To run CriptoRPS, you need the following:

  • Node.js installed on your machine

🚀 Installation

  1. Clone the repository:

     git clone https://github.com/AbdusSattar-70/criptoRPS.git
     cd criptoRPS
  2. Install dependencies:

    npm install

🎮 Gameplay

🔄 How to Play

  1. Run the game:

    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!

📊 Game Logic

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

👥 Authors

👤 Abdus Sattar

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.

Show Your Support

If you like this project, please give it a star ⭐️. You can use it following the MIT License.

Acknowledgments

I would like to thank Itransition-Group for the opportunity to learn and use their platform and services for free.

License

This project is under the MIT License.

About

CriptoRPS - a Rock, Paper, Scissors game with a cryptographic twist! This command-line game is built using JavaScript and incorporates HMAC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published