Project: Rock Paper Scissors (v1)

Introduction

We’re going to make a simple implementation of grade-school classic "rock paper scissors". If you don’t know what that is check the wikipedia article or this ridiculous step-by-step. For the moment we’re just going to play the game from the browser console, but we will revisit it and add a front end later so don’t forget to keep the code on GitHub!

Problem Solving

Before starting your first JavaScript Project, let’s talk about the most important skill for a developer: problem solving. Your primary goal as a developer is to use whatever programming language you know to solve problems.

For most beginners (in programming), problem solving can be a challenging skill regardless of the programming concepts or commands you know. Staring at a blank screen and not knowing where to start is a pretty common situation for beginner programmers. In order to overcome this blocking situations, here are some helpful techniques:

  • Make sure you understand exactly the problem you are trying to solve. Explaining the problem to someone or even yourself can greatly improve your understanding. Drawing diagrams or writing the problem on paper also helps a lot.

  • Come up with a Plan before starting to code. What are the steps that you need to follow and implement? In what order? What technologies, algorithms or commands must you use for each step? How can one step affect subsequent steps?

  • Write the solution in Pseudo Code. You don’t need to start writing JavaScript right ahead. Writing the solution in an easy to read and understand pseudo code helps you understand how each piece of the program fits in the big picture and also what’s the main responsibility of each code section. An example of a user input might be something like the following:

  1. Get input from the user in form of two numbers
  2. Multiply the two numbers and store them in a variable
  3. Display the variable that contains the result in a modal box
  • Divide and Conquer: split your problem into smaller, easier to solve problems. If you feel stuck, you can start from the easiest problem at hand. Avoid trying to solve the problem all at once. It’s always a good approach to break your problem down into smaller ones and reduce complexity.

References:

Assignment

Check the instructions here.

Once you’ve completed and tested your code submit the GitHub URL to the form below.

LOOKING FOR HELP?

When looking for help, try doing so in the following order:

  • Did you try everything you could?
  • Did you read the documentation?
  • Did you Google for it?
  • Did you post your question on Slack/Forum?
  • Did you ask your fellow students for help?
  • Did you ask your Mentors for help?
  • Did you leave a comment on the comments section of this page?
  • Did you ask your Instructor for help?
    • Did you arrange and appointment with your instructor using Calendly? Visit this URL and set up an appointment: https://calendly.com/kostasx
    • Is it urgent? Did you try reaching him on Slack

UPDATED: 04.05.2021

  • [Added Problem Solving section]