LarrySul / rock-paper-scissiors-challenge

In this repository I will be building a rock-paper-scissiors game with test (unit and feature) with best OOP practise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rock-Paper-Scissors CLI Game

This CLI program is built on the LARAVEL FRAMEWORK. The program is built on a multiplayer, i.e. human vs human or human vs computer. Only three possible input types are accepted (Rock, Paper and Scissors). To play the game, users must follow the command prompt. The game's output is either a win, draw or lose, depending on the user's game choice.

Repository Overview

The repository contains source code on how to play the Rock-Paper-Scissors game.

Specifications in the clone include

  • The program reads users' I/O and then displays results in the CLI. The console command file can be found within the console > commands directory with the name RockPaperScissors.

  • Screenshot of read write operation via the CLI

  • To excute the command, users need to run the artisan command `php artisan rock-paper-scissors` in the CLI
  • Writing of errors to logfile
  • I/O validation
  • Screenshot of I/O process with validation

  • Single CLI command to automate the read and write process with easy to read instructions
  • The project has a total of 4 test cases (3 Unit and 1 Feature) that executes in 0.06seconds.
  • Screenshot of test cases

  • The project is also dockerized, pushed to dockerhub where it is available to be pulled
  • Screenshot of dockerized project

    Requirements

  • Download PHP V8.1 and above.
  • Install Composer
  • If you'll like to use docker you should download docker desktop and pull the image
  • Game Explanation

    Rock-Paper-Scissors involves the game elements and it's structured and the rules include

  • Rock beats Scissors
  • Scissors beats Paper
  • Paper beats Rock
  • Steps to run locally

  • Clone this repository:
  •  git clone https://github.com/LarrySul/rock-paper-scissiors-challenge 
    or pull image via docker
      docker pull olanrewaju1992/rock-paper-scissors:latest 
  • Install dependencies:
  •  composer install 
  • Open the CLI in preferred editor and run the command:
  •  php artisan rock-paper-scissors 

    Once the command is done you'll get a success message in the CLI :)

    Screenshot of CLI process with output

    About

    In this repository I will be building a rock-paper-scissiors game with test (unit and feature) with best OOP practise


    Languages

    Language:PHP 82.2%Language:Blade 16.2%Language:Shell 0.8%Language:JavaScript 0.5%Language:Dockerfile 0.3%