[2048]-WeChat Mini Program Development Tutorial-Introduction-Practical [1]

1. Introduction    

  • Goal of this section: Understand the principle of [2048] and conduct a preliminary requirements analysis.
  • Target users: Students who have studied [Introduction] or students who have some programming experience.
  • Learning Objectives: Get an overview of the requirements design phase by business modeling.
  • Case Study: Mini Game 2048.
  • code download
  • Try it online (click me!!!)
  • Portal:


Table of Contents: WeChat Mini Program Tutorial-Introduction-Soon WeChat Mini Program Community
Previous: [helloworld]-WeChat Mini Program Tutorial-Introduction Summary [6]-Soon WeChat Mini Program Community    
Next: [2048]- WeChat Mini Program Tutorial - Getting Started - Actual Combat [2] - Soon WeChat Mini Program Community    

2. Mini Game 2048



Through the trial play , we can find that Mini Game 2048 is easy to use and the rules are very simple. The specific summary is as follows:

  • game state diagram





Trigger conditions for game start: After starting, enter the main page of the game for the first time.
                                     Click the New Game button.
Operation rules: Every time you slide, the number 2 will be randomly generated in the blank area. If the numbers are the same, add up and release a grid space. For details, please refer to the online 2048 game .
End condition: 2048 reached, success; no space, failure.
Operation skills (don't read this, ha): put the largest number in the corner as much as possible.
                                            The numbers are placed next to each other in order. The column/row that satisfies the largest number and the second largest number first is full.
                                       Always pay attention to a similar number next to the larger number (above 32) of the activity.
                                       Take the row where the large number is located as the main moving direction.

3. Summary         
     
This is the summary. . . A bit fast. . .
Let's play 2048 more, and then help the above legend to think about it, if you code yourself, how to deal with it.
Don't get caught up in the details. If you feel that you can't start, you might as well do subtraction until you can do it. Subsequent chapters will explain the relevant analysis process step by step.
Note: Methodology is more important! ! !

4. The         

next section predicts that the demand analysis of this article will be subtracted.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324856729&siteId=291194637