Updates to the Tetris source code parsing Series

Source: Internet
Author: User

Mid-Autumn Festival in the Tetris SeriesArticleTo be honest, I want to cook a dish.

I never thought that an article could have more than clicks in a day.

I used to write more than a dozen drops for over half a month.

Baidu searched for it and gave it to other websites. Hey

I really appreciate the help of the blog administrator. Thank you very much.

 

The blog Park is a good place for talents to gather, share, and learn freely.

 

Last thanks

# View the reply reference on the 5th floor
By toeverybody
Yes, it is a little slow in Running Control.
It's still faster to use C ++ or Delphi.

 

Finally, checkCodeThis is actually an issue with the code,

It's not because of the low efficiency of. net. You said that the current machine is so fast, and the efficiency of. NET is even lower,

I want to trust Microsoft.

 

I believe that students have noticed the following points:

 

// One step GM. go (); // perform the "Move Down" Operation on the game logic (where to move down, for example, and how all these logics are judged in the game class) GM. display (panel1.handle); // score is displayed after the operation is complete. TEXT = GM. score. tostring ();

 

 

Note that the sentence is displayed after the operation, in the interval event of Timer

It means that the display function must be called every 500 milliseconds, depending on timer. That is to say, no matter how fast you press it, it will not immediately show on the screen, so it looks like a card or a card

It seems that. NET is inefficient.

 

So now, in the "New Version" (ER ~~~ It is indeed a new version. We call it the 1.1 release version. It used to be a beta version..., ah, ~□) display is removed from the interval event.

Directly assign the Panel1 handle to the game master.Program,

Then, immediately display the image after you press the left-to-right shift or deformation operation, so that the problem will not occur ;)

 

Also thanks:

 

# View the reply reference on the 6th floor
By funskiller
There is a bug. When it falls, if there is a square across, then the falling square is inserted directly in... instead of judging something.

 

Reply

As for the question of "insertion", I don't want to talk about it. (It seems strange to say it. The poor monk is born with evil thoughts and goes back to reflect on it. Oh, Nathan Buddha .....)

This bug can be used as a trick to use zookeeper

It is not difficult to solve this bug. It is okay for everyone to study the code, and there are comments.

 

In addition, the square is "Invincible" in the moment of deformation, that is, it can "penetrate". After the deformation is completed, the "Drop" operation will be performed"

At this time, the program found that the original "can not fall. As a result, the square is "embedded into the wall", that is to say, the "insert" above this is a principle.

Very interesting. You can use it as a skill during the course of playing. This is not a function available on the FC game machine.

 

There is also a "rotation Chart" that has applied for a patent in Chapter 4.AlgorithmImproved,

Rotate Based on the center

Now, when everyone is playing the game, they want to learn how to spin up, how to get started with cars, and how to turn around ..... (Do not hit me)

 

In addition, the block types in the shape class can be adjusted (the switch statement ),

The width and height of the gamearea class can also be adjusted. After the adjustment, the number of horizontal grids and the number of vertical grids of the "Container" will increase (it is recommended that the number be less than the initial value or an error may be reported ),

Of course, don't forget to set the width and height of Panel1 to the number of cells x 30 pixels.

Check whether recompilation is different.

 

You can also add spaces to the upper, lower, and lower layers.

In addition, I have updated the program. You can try it again. The wall-crossing function is not stuck.

 

Download the complete project source code

 

And ......

Mu has

 

Finally, we would like to thank you for the following:

# View the reply reference on the first floor
By Alan. Zhu
A: d is supported first.
Learning ing

 

Continuous support

 

And other valuable comments from shoes,

Thank you for choosing thanx.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.