Git Product home page Git Product logo

rpsgame's Introduction

RPSGame

Overview

Console game similar to Rock-Scissors-Paper with configurable moves functionality and cryptographic confirmation of the PC's moves. Develops as a task project for an internship of the Itransition company .

Reduction of requirements

Develop console game similar to Rock-Slicers-Paper.

Allows to play the game Rock-Slicers-Paper with PC with configurable move variants.

Functional requirements:

  1. Move variants are configured as a command line arguments.
  2. Number of the move variants must be odd and more or equal three.
  3. Move variants cannot be duplicated.
  4. Victory or defeat is computed by sequence of a command line arguments: next half of move variants loses current move variant, and previous half wins current move variant.
  5. Player is asked to choose move variant, exit or help during his move.
  6. PC's move confirms by cryptographic sign: PC generates secret key, computes signature for his move and shows signature to player. PC shows secret key after player's move. It is allows to make sure that the PC is not change his move variant.
  7. User interface must be in English.

Non-functional requirements:

  1. Cryptographic signature must be computed by HMAC SHA2 or SHA3 algorithm.
  2. Secret key length must be more or equal 256 bits.

Project structure

Logic entities:

  1. TUI
  2. game context
  3. Data signer
  4. Key generator

Program entities:

Interfaces:

  1. IKeyGenerator
  2. IDataSigner

Classes:

  1. TUI
  2. GameContext
  3. BaseKeyGenerator
  4. HMACSHA2DataSigner

Enums:

  1. RoundResults

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.