Memory Flip is a classic memory training game. The desktop is covered with cards facing up from the back, and you can flip two cards at a time - if their patterns are the same, even if the pairing is successful, the two cards will permanently light up; If it's different, the cards will flip back. The goal is to pair and eliminate all cards in the shortest possible time and with the least number of steps.

The gameplay originated from the "Concentration" card game of the last century. The rules are simple enough for a 5-year-old child to learn in 10 seconds, but they are also durable enough to be a classic choice for training observation and short-term memory.

🕹️  Gameplay rules

Opening: The system arranges the washed cards in a neat formation according to the difficulty you have chosen, with all cards facing up from the back

Flip card: Open any card, then click another one - this is your step

Judgment:

🟢  Same → Paired successfully, two cards locked and lit green

🔴  Different → Display briefly for about 0.8 seconds and then automatically flip back

Clearance: Eliminating all pairings is considered victory, and you will be told how many steps were taken during checkout

Memory expert

A total of 36 animal emojis have been prepared on the card surface( 🐶🐱🐭🐰🦊🐼🐨🦁… until 🦕🐉), When the quantity is insufficient, it will automatically cut from front to back to ensure that each pattern is paired perfectly.

✨  Core mechanism and details

Flip Lock

You can only flip two pages at a time. After flipping the second card, no other cards can be played within 0.8 seconds - this is to prevent players from "sweeping" and is also a standard design for memory games. If the pairing is successful, it will be delayed by about 0.26 seconds before locking, allowing the eyes to keep up with the pairing feedback.

shuffle algorithm 

Adopting Fisher Yates shuffling: traversing from back to front, swapping with random positions each time. This is a mathematically proven uniform random algorithm that ensures that the card order at each opening is truly unpredictable, without the occurrence of "seemingly random but actually skewed" situations.

3D flipping animation

Card flipping uses CSS transform: rotateY (180deg) combined with back visibility: hidden to achieve true 3D flipping, with a slow transition of 0.35 seconds and rounded corner projection; There is also a pop diffusion animation with a green halo after successful pairing.

Step count statistics

The top status bar displays real-time "step count/pairing progress" (such as 12 steps · 5/8 pairs), and the clearance pop-up will summarize your score, making it convenient for you to repeatedly challenge and refresh records.

🧠  Tips

When opening a new card for the first time, remember its position first, rather than rushing to find the second one

Cards that fail to pair will flip back after 0.8 seconds - this is the window for you to deepen your memory

The higher the difficulty, the more important it is to "remember the position" than "remember the pattern"; Numbering the chessboard partitions would be very helpful

Leave a comment

Log in with itch.io to leave a comment.