The rock-paper-scissors game is a very basic game that requires only simple javascript to develop. It's a computer-and-user based game. The user makes a choice by clicking on either rock, paper, scissors. While computer choices are generated automatically. For every user choice, computer choice is generated using Math.random and Math.floor PLAY GAME HERE
The memory game is played by matching two cards together, any two cards matched correctly give the player one point. It is a basic mobile game designed with HTML, CSS and Javascript only. When two cards are chosen correctly, the data-id of the cards are stored in an array using the PUSH method. While the Math.random is to shuffle the game when the game restarts or the browser refreshes. The game cards cannot be viewed or inspected using the browser developer/inspect element tool. Every card was added to the game board using the javascript APPEND method to avoid cheating. Some other methods used in developing this game include: Array []; Sort(); Append(); Math.random(); Push(); if... else .... Play game HERE
good
ReplyDelete