Home > Article > Web Front-end > HTML5 memory flip game implementation ideas and code_html5 tutorial skills
The 2 cards turned over will be eliminated if they match, otherwise the 2 cards will be returned to the back.
Requirements Analysis
How to draw the front and back cards and how to eliminate the cards after successful matching
How to generate a deck and determine each card The position of the cards and the corresponding pictures
How to shuffle the cards
How to record the pairing information of the deck
How to determine whether the click event is the first click or the second click
Cheating Event handling: Click on the same card twice. Click on the eliminated card. Click on the area outside the card.
After the card is turned over, you need to give a certain amount of time for the player to see clearly. How to achieve pause
Mouse click Response to the event and obtain the coordinates of the mouse click position to determine which card was clicked
MYCode: