Welcome to my tutorial!

In this tutorial, we’re gonna build a really simple game of Rock Paper Scissors Spock Lizard.

Please check my GitHub account for the complete  source code.

We are gonna use vanilla JavaScript, HTML, CSS for this game.

YouTube video

Let’s get started.

First, we need to set up our project folder.

Please create a folder for the game.

Put an empty

index.html,index.css,index.jsfile in the folder.

Now you want to put some tags in

index.html.

<html>
  <head>
    <title>GAME</title>
  </head>
  <body>
  </body>
</html>

Don’t forget to save the file periodically.

We can check that we doing fine by running this file in a browser.

Okay, We can move forward.

Now you want to add input elements for a user.

<span>YOUR CHOICE</span>
    <div id="user-options">
        <div>
            <input type="radio" id="1" name="option" class="user-option">
            <label for="1">⛰️</label>
        </div>
        <div>
            <input type="radio" id="2" name="option" class="user-option">
            <label for="2">✂️</label>
        </div>
        <div>
            <input type="radio" id="3" name="option" class="user-option">
            <label for="3">🧻</label>
        </div>
        <div>
            <input type="radio" id="4" name="option" class="user-option">
            <label for="4">🖖</label>
        </div>
        <div>
            <input type="radio" id="5" name="option" class="user-option">
            <label for="5">🦎</label>
        </div>
    </div>

#javascript-tutorial #game-development #spock-lizard #javascript

How to Create Rock Paper Scissors Spock Lizard in JavaScript
2.30 GEEK