Learning about Cert's Russian square

Source: Internet
Author: User

Recently, I learned C and wanted to do a big exercise. So I chose tetris. I am a computer science student. To tell the truth, the theory is okay, and my hands-on skills are poor. I asked my students to do it first, then I will explain to him how to build the Russian square step by step. I feel that this is also a small challenge to me. After all, the university is much deserted and has little to do.

There are a lot of square on the Internet, because C is used, and Chen Chang was chosen as the learning template.

Environment: Win-TC 1.91

Key Technology Chen Chang wrote in detail: http://kb.cnblogs.com/a/341517/

Source code: http://www.pudn.com/downloads67/sourcecode/game/detail241488.html

Although the source code cannot be downloaded (to be registered), it can be previewed and can be used directly... note: I <X instead of I = X should be used for the second variable in the for loop in Chen Chang edition. In some cases, you have to change it yourself. In general, it is correct. Chen Chang's code is well written, with clear structure, smoothness, and rigor. It is a good learning template.

 

1. There are two important data structures:

How do I represent 1.19 different images?

Struct shape
{
Int XY [8];
Int color;
Int next;
}

2. How is the Panel represented?

Struct boards
{
Int exist;
Int color;
} // Slightly different from Chen Chang

Write it here first. If you are free, continue.

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.