Skip to content

Users play against the computer to get the best of 3 rounds on this adaptation of a classic game usually played by two people using their hands and no tools. The idea is to choose shapes with an outstretched hand represented by numbers, where each shape will have a certain degree of power and lead to an outcome.

Notifications You must be signed in to change notification settings

cinthiafontoura/rock-paper-scissors-game

Repository files navigation

Rock Paper Scissors Game

Rock Paper Scissors is a Python terminal game which runs in the Code Institute mock terminal on Heroku.

Users play against the computer to get the best of 3 rounds on this adaptation of a classic game usually played by two people using their hands and no tools. The idea is to choose shapes with an outstretched hand represented by numbers, where each shape will have a certain degree of power and lead to an outcome.

Live game at Rock Paper Scissors Game.

final-layout-responsive

Table of Contents

How To Play

The player enters their name and chooses their move to start the first round.

Rock beats scissors, scissors beats paper, and paper wins against the rock.

⮪ Back to the Table of Contents

Features

  • The introduction to the game and rules is given.
  • The user is asking to enter a name.

introduction

  • The user was not allowed to leave empty numbers or alphanumeric for the name input. And feedback is provided case it occurs.

name-validation

  • Random generation of computer and user choice is printed with the round number and the score.

round

  • After the third round, the game results pop on the screen

result

  • The new score is added to a worksheet using a Google API.
  • The latest six results are printed on the screen.

latest-scores

  • The user can enter the numbers 1, 2 or 3 as the instructions ask, and the program will provide feedback if they type something different.

choice-validation

Future Features

  • Change the order of the latest scores to a decrescent order.

⮪ Back to the Table of Contents

Testing

  • No errors or warns are returned when passed through the PEP8 linter.
  • All valid inputs are managed by not accepting strings when numbers are requested or numbers or empty information when strings are expected.
  • Tested in my local terminal and The Code Institute Heroku terminal.

Bugs

Solved bugs

  • When the Code Institute terminal was returned a gspreed not determined error, I fixed running the pip3 freeze > requirements.txt.

Remaining Bugs

  • No bugs remaining.

⮪ Back to the Table of Contents

User Experience

  • I had put the button on the bottom of the terminal and made it more extensive, and changed the button value to "PLAY GAME", but when I tested with users, they got confused with the new layout and tried to click PLAY GAME instead hit enter in the keyboard to enter the inputs. To solve this, I return the original location, size, and value and keep the pink style.
  • The user always presses 3 instead of 0 to play, so I change the input choices to 1, 2, and 3 so the user does not get confusing and does not need to go to the other side of the keyboard when choosing moves. It is also more logical to count from one than zero for most players.
  • Even with the ASCII art at the end showing if the player wins, loses or draws, they feel a need for more feedback confirming this.
  • For those that want to play again, the instruction is given when the game ends.

final-layout

⮪ Back to the Table of Contents

Deployment

  • Create a repository using the Code Institute template for Python command-line project.
  • Run the command pip3 freeze > requirements.txt to ensure the gspreed will work on the deployed app.
  • Go to Heroku webpage and log in/sign up.
  • At the dashboard, click the New button -> Create new app.
  • Add an app name, choose the region, and click the Create app button.
  • On the Settings tab -> Config Vars section -> Reveal Config Vars add the KEY and VALUE needed.
  • Bellow on the Buildpacks section -> Add buildpack button to add Python and Node.js to the list.
  • On the Deploy tab -> Deployment method section, choose GitHub.
  • Search for a repository to connect to on the Connect to GitHub section and click Connect.
  • Choose a branch and click on Deploy Branch on the Manual deploy section to finish the deployment.
  • After a few seconds, open the deployed app by clicking on the View button.

Live website at Rock Paper Scissors Game

⮪ Back to the Table of Contents

Credits

⮪ Back to the Table of Contents

About

Users play against the computer to get the best of 3 rounds on this adaptation of a classic game usually played by two people using their hands and no tools. The idea is to choose shapes with an outstretched hand represented by numbers, where each shape will have a certain degree of power and lead to an outcome.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published