Hello Guys this game is Very Much Simple to Create. We will see now how it works.
How it works?
When you open the main index file then you will see two prompts of javascript which will take player1 and player2 name. Then the game will start and you have to play it one by one . Player1 indicates to the rabbit and player2 indicates tortoise. As you click on play button of each Player1 and Player2 , the position of each player is decided randomly between the 1 and 9. The one who reaches first to 9th i.e last position wins the game . There is no end to the game , as one of both wins , you can refresh and play or you can continue as it is.
How it's code works?
The HTML and CSS are used to create the layout and styling of the the game. The main functioning is done by the Java-script. I have Used a simple technique for this.
As you hit the Play button a random number is generated between the 1 and 9 and by changing the position of rabbit or tortoise . You can download the code from links below, and can see how actually it works.
👇 Download the Zip File 👇
0 Comments