Rules and Starting
This tool, "Memory Test/Memory Game," is a browser game where you memorize the pattern of 4 colored panels that light up and sound in order, and tap them in the exact same sequence.
The game starts by pressing the "START" button in the center of the screen.
When you press START from the standby state, the game state switches to "playing," and after a 600-millisecond standby time, the first color is presented.
The 4 panels consist of green (top left), red (top right), yellow (bottom left), and blue (bottom right), each functioning as an independent button.
The system internally calls the getRandomColor function and randomly selects 1 out of the 4 colors to create the first sequence (array).
The game's progress is displayed in the center and bottom panels of the screen as a numeric value indicating the current score and round number.
Players do not need to configure any special settings in advance; you can play immediately just by opening the page in your browser and pressing START.
For first-time players, you can open the how-to-play help modal from the "?" icon in the top right corner of the screen. In the help, you can check the basic rules of memorizing the sequence of the panels and tapping them when it's your turn.
The start operation can be executed not only from the center button but also from the "RETRY" button after a game over.
One Round and Scoring
Once the game starts, one colored panel is added per round, appended to the end of the existing array. The player must memorize the entire sequence of presented colors and reproduce it by tapping them in order from the first color.
Each time the player taps a panel, the system checks the inputted color against the current index of the correct sequence held internally.
For example, if the correct answer is "green -> red -> blue" and the player chooses "green" on the first tap, it is judged as a match, and the game transitions to waiting for the next input.
When all panels in the array are tapped correctly to the end, the round is cleared, and the score increments by "+1".
When the score is added, a new random color is added to the current sequence array, and the game automatically progresses to the next round.
As the rounds progress, the number of colors to memorize increases by one, creating a chain of increasingly longer patterns.
If you tap a panel that differs from the correct sequence during your input, it is instantly judged as a mismatch, and the game over process is executed.
Upon game over, a "GAME OVER" screen is displayed, presenting the number of rounds reached and the number of rounds correctly answered to the end (final score) as the result.
You cannot redo the progress, and pressing the RETRY button will start a new game with the sequence and score completely reset to zero.
Light, Sound, and Input Standby
While the system presents the pattern, the panels automatically light up and play a sound simultaneously. The lighting and sounding time for a single panel is set to 350 milliseconds, with a 150-millisecond interval before the next panel lights up.
During this presentation and lighting phase, panel click inputs by the player are blocked (disabled).
In terms of audio, it uses the AudioContext of the Web Audio API to synthesize sine waves directly within the browser using an oscillator.
Each color is assigned a specific frequency: green plays at 415.30Hz, red at 310.08Hz, yellow at 252.00Hz, and blue at 209.30Hz. This allows you to grasp the sequence not only through visual color changes but also through differences in pitch.
Once the pattern presentation is complete and the text "Your turn" flashes on the screen, the input block is lifted, and the system is ready to accept player taps.
When the player taps, the panel's lighting and sounding processes are executed in the same way, allowing you to visually and audibly confirm that your action was recognized by the system.
You can also mute all sound output by using the speaker icon in the top right corner.
Practical Examples for Memorization
As the rounds progress and the pattern becomes longer, it becomes difficult to memorize the sequence of colors using simple intuition alone.
Therefore, there are several practical approaches players can take to reinforce their memory of the processing results on the browser.
The first is to memorize the continuity of pitches as a melody. Since the four frequencies outputted from the Web Audio API serve as distinct audio cues, you can utilize auditory memory by perceiving them not just as a visual sequence of colors, but as a rhythm of rising and falling sounds, such as "ta-tsu-to-te".
The second method is to remember the spatial arrangement as if connecting them with a line. Utilizing the layout where a circle is divided into four quadrants—green (top left), red (top right), yellow (bottom left), and blue (bottom right)—you can translate the sequence into imagery of a trajectory, such as "moved diagonally from top left to bottom right" or "went back and forth across the top." You can also try organizing the sequence as a movement image by slightly tracing the trajectory in the air with your fingertip during the 150-millisecond interval between panels.
The third method is to treat the first few patterns as a grouped block (chunk). Due to the specification where one color is added per round, the initial array is presented repeatedly.
By memorizing the first three steps, like "green, red, green," as a single set and focusing only on the newly added colors, you can distribute the cognitive load on your brain's memory space while preparing for the input standby phase.
High Score Saving and Reset Scope
If the player continues to increase their score without getting a game over, the highest score (high score) is updated once it surpasses the previous record.
The high score is saved using localStorage, a standard Web Storage API of the browser, and is recorded as an integer value under the key name "simon_says_high_score".
The moment a sequence is fully completed and the score is added, a comparison process runs between the current score and the saved high score.
If the current score exceeds the high score, the localStorage value is immediately overwritten and saved, and visual effects such as a personal best update badge or a crown icon are reflected on the game screen.
Because this high score record is retained within the same domain of your browser, it will be loaded as your past highest score even if you reload the page or access it again after restarting the browser at a later date.
On the other hand, the scope of score resetting depends on the clearing of browser cache and site data. If the user manually deletes the local storage data of this site from their browser's browsing history, the high score will also be reset and return to "0".
There is no explicit reset button implemented within this tool, and the current playing score (win streak) will always restart from 0 by pressing the RETRY button.
Usage as Play, Not Measurement
Although this tool takes the form of a classic brain-training game that challenges the limits of memory, it is provided strictly as an entertainment application running on the browser.
Internally, the program merely repeats the process of evaluating input correctness and appending to an array; it does not feature functions to calculate a player's IQ or strictly measure cognitive functions.
Additionally, the achievable score varies depending on age, playing environment, daily physical condition, and device tap sensitivity.
Because it is not designed for the medical improvement of cognitive functions or strict capability assessment of working memory, please treat it simply as a casual game to enjoy "how long of a sequence you can memorize."
Since there is no function to send rankings externally or compete against other players, it is best suited for aiming to break your own personal records at your own pace on your own device.
For example, it can be used as a tool to fill small bits of free time in your daily life, such as playing it for a quick refresh between tasks, or passing the device around to compete for scores with family and friends.
Please enjoy the pure gaming experience of focusing and tapping continuously to avoid triggering the game-over error sound, while enjoying the glowing panels and electronic tones.