prompts.chatprompts.chatprompts.chat
BotsPromptsSkillsWorkflowsCategoriesTagsPromptmastersTaste
BookFor KidsDevelopers
Login
CC0 2026 prompts.chat
DeepWikiHow to...DocsAPIPrivacyTermsSupportAboutGitHub

Match-3 Puzzle Game: Create a standalone HTML file containing CSS and JavaScript to generate a classic 8x8 grid match-3 game.

Match-3 Puzzle Game: Create a standalone HTML file containing CSS and JavaScript to generate a classic 8x8 grid match-3 game. The game needs to showcase the following core modules through a dynamic grid and click-and-swap interactions

邱
@loshu2003
9 months agoJanuary 29, 2026 at 02:37 AM
Coding•AI Tools

Content

Match-3 Puzzle Game: Create a standalone HTML file containing CSS and JavaScript to generate a classic 8x8 grid match-3 game. The game needs to showcase the following core modules through a dynamic grid and click-and-swap interactions: 1. **Game Board System**: Use CSS Grid layout to generate an 8x8 square game board, randomly assign a color to each square, and record the board state through a two-dimensional array. 2. **Core Interaction Logic**: Listen for click events on squares, implement the judgment and execution of position swapping between adjacent (up, down, left, right) squares. 3. **Elimination Judgment and Chain Reaction**: After swapping, traverse the game board to detect whether there are three or more consecutive squares of the same color in the horizontal or vertical direction, eliminate them and accumulate scores; after elimination, trigger the squares above to fall, generate new squares at the top, and loop the detection until no more eliminations can be made. 4. **Scoring and State Management**: Implement a scoring system (e.g., 10 points for each eliminated square), update the score display in real-time, and can be extended with game timing and end judgment. 
 The interface should adopt a bright and lively cartoon style, and the code should be integrated into a single file.

Related Prompts

Memory Card Game

Text

Develop a memory matching card game

F@f
0

Sudoku Game

Text

Create an interactive Sudoku game

F@f
0

Comments (0)

Chess Game

Text

Develop a feature-rich chess game

F@f
0

Interactive Quiz

Text

Develop a comprehensive interactive quiz application

F@f
0