Skip to content

i4pg/rock-paper-scissors

Repository files navigation

Rock Paper Scissors

Simple implementation of grade-school classic “rock paper scissors”. It is part of the curriculum for The Odin Project's Foundation path.

Demo

You can play the game online in browser console here.

Features

  • Nice shuffling for rock paper scissors choices
  • Light/Dark mode
  • The winner is displayed at the end of the game.
  • The game keeps running and calculating points.
  • Responsive mobile-first design

Showcase

Wireframe

ScreenShots

Getting Started

Usage

You can play the game online in browser console here.

Installation

To run this program locally, you can clone the repository to your local machine using the following command:

git clone https://github.com/i4pg/rock-paper-scissors.git

Then open the index.html file in your web browser to start playing the game.

Or simply run to play in your Terminal

$ node scripts/app.js

To-do

  • Implement core logic
    • Get random choice for computer
    • Get player choice manually
  • Winning logic
    • Core logic
    • Add comparing function
    • return proper value
  • Game rounds
    • Single round
    • Loop 5 times
    • console.log each round's score
    • console.log the end result
    • Report about the winner
  • Use prompt to get user input
  • UI
    • Enhance Node environment visibility
    • run game.js from gameConsole.js
    • Browser
      • wireframe
      • night/dark mode
      • header
      • Quit button "Scripts may close only the windows that were opened by them :( "
      • intro
      • main
      • footer
      • game over UI
      • controllers
        • 5 rounds game

Contributing

Contributions to this project are welcome. To contribute, follow these steps:

  1. Fork this repository.

  2. Create a new branch with your changes:

    git checkout -b my-new-branch

  3. Make your changes and commit them:

    git commit -am 'Add some feature'

  4. Push your changes to your forked repository:

    git push origin my-new-branch

  5. Create a pull request on this repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.